mark



pmark
UITableView
ptableview
lazy var mainView: UITableView = {
let view = UITableView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenHeight - kTopHeight), style: .plain)
view.delegate = self
view.dataSource = self
view.tableHeaderView = UIView()
view.tableFooterView = UIView()
view.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")
view.separatorStyle = .none
view.backgroundColor = .white
view.rowHeight = 44
view.showsHorizontalScrollIndicator = false
view.showsVerticalScrollIndicator = false
if
// 底部空余安全距离
view.contentInsetAdjustmentBehavior = .never
view.estimatedRowHeight = 0
view.estimatedSectionHeaderHeight = 0
view.estimatedSectionFooterHeight = 0
} else {
self.automaticallyAdjustsScrollViewInsets = false
}
if
UITableView.appearance().sectionHeaderTopPadding = 0
}
return view
}()
required init?
prequiredinit
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}