Commit f695370a authored by pete谢兆麟's avatar pete谢兆麟

刷新单行

parent 988d0309
......@@ -21,7 +21,7 @@ class YHHomePageViewController: YHBaseViewController {
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 10.0
flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20)
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
......@@ -84,7 +84,9 @@ private extension YHHomePageViewController {
if self.viewModel.hasMoreForHomeNews == false {
homeCollectView.es.noticeNoMoreData()
}
self.homeCollectView.reloadData()
// self.homeCollectView.reloadData()
self.homeCollectView.reloadItems(at: [IndexPath(index: 0)])
}
}
......@@ -96,9 +98,9 @@ private extension YHHomePageViewController {
if self.viewModel.hasMoreForHomeNews == false {
homeCollectView.es.noticeNoMoreData()
}
UIView.performWithoutAnimation {
self.homeCollectView.reloadData()
}
self.homeCollectView.reloadItems(at: [IndexPath(index: 0)])
// self.homeCollectView.reloadData()
}
}
......@@ -116,8 +118,9 @@ private extension YHHomePageViewController {
view.addSubview(homeCollectView)
homeCollectView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.left.right.equalToSuperview()
make.top.equalTo(searchView.snp.bottom).offset(6)
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
homeHeaderView.frame = CGRect(x: 20, y: -YHHomeHeadView.viewH, width: KScreenWidth - 40, height: YHHomeHeadView.viewH)
......
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