Commit 4343f938 authored by pete谢兆麟's avatar pete谢兆麟

服务中心闪动问题

parent 6d69d267
......@@ -15,9 +15,10 @@ class YHServerHKLifeViewController: YHBaseViewController {
var tableFootView: YHServiceTableFootView!
var sectionView: YHServiceSectionView!
var classId: Int = 0
var cell: YHServerHKLifeViewCell!
var dataSouce: [YHHomeListModel?] = [] {
didSet {
self.homeTableView.reloadData()
cell.tableFootView.items = dataSouce
}
}
var homeTableView: UITableView = {
......@@ -105,7 +106,7 @@ extension YHServerHKLifeViewController {
homeTableView.tableFooterView = tableFootView
homeTableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
make.bottom.equalToSuperview()
}
homeTableView.delegate = self
homeTableView.dataSource = self
......@@ -159,11 +160,11 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell0.tableFootView.items = dataSouce
cell0.tableFootView.myCollectView.es.removeRefreshFooter()
cell0.selectionStyle = .none
return cell0
cell = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell.tableFootView.items = dataSouce
cell.tableFootView.myCollectView.es.removeRefreshFooter()
cell.selectionStyle = .none
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
......@@ -12,12 +12,12 @@ class YHServerNoOrderView: UIView {
typealias SectionBlock = (YHClassifyModel) -> ()
var sectionBlock: SectionBlock?
var loadMoreBlock: SectionBlock?
var cell: YHServerHKLifeViewCell!
var tableHeadView: YHServerTableHeadView!
var sectionView: YHServiceSectionView!
var dataSouce: [YHHomeListModel?] = [] {
didSet {
self.homeTableView.reloadData()
cell.tableFootView.items = dataSouce
}
}
var homeTableView: UITableView = {
......@@ -114,11 +114,11 @@ extension YHServerNoOrderView : UITableViewDelegate,UITableViewDataSource {
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell0.tableFootView.items = dataSouce
cell0.tableFootView.myCollectView.es.removeRefreshFooter()
cell0.selectionStyle = .none
return cell0
cell = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell.tableFootView.items = dataSouce
cell.tableFootView.myCollectView.es.removeRefreshFooter()
cell.selectionStyle = .none
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment