Commit e1cc67da by pierce

fixed bugs

parent c2927501
...@@ -270,6 +270,8 @@ class GDMomentPlazaMomentCell: BaseTableViewCell { ...@@ -270,6 +270,8 @@ class GDMomentPlazaMomentCell: BaseTableViewCell {
var clicking = false var clicking = false
func setup(with model: GDMomentPlazaMomentModel) { func setup(with model: GDMomentPlazaMomentModel) {
currentModel = model currentModel = model
contentCollectionView.reloadData()
reuseDisposeBag = DisposeBag() reuseDisposeBag = DisposeBag()
clean() clean()
...@@ -393,8 +395,6 @@ class GDMomentPlazaMomentCell: BaseTableViewCell { ...@@ -393,8 +395,6 @@ class GDMomentPlazaMomentCell: BaseTableViewCell {
updateFrame() updateFrame()
contentCollectionView.reloadData()
if let layout = contentCollectionView.collectionViewLayout as? UICollectionViewFlowLayout { if let layout = contentCollectionView.collectionViewLayout as? UICollectionViewFlowLayout {
if model.images.count == 3 { if model.images.count == 3 {
layout.scrollDirection = .horizontal layout.scrollDirection = .horizontal
......
...@@ -162,6 +162,7 @@ class GDMomentPlazaController: BaseViewController { ...@@ -162,6 +162,7 @@ class GDMomentPlazaController: BaseViewController {
self.scrollView.frame = self.view.bounds self.scrollView.frame = self.view.bounds
self.scrollView.contentSize = .init(width: self.scrollView.width * 2, height: self.scrollView.height) self.scrollView.contentSize = .init(width: self.scrollView.width * 2, height: self.scrollView.height)
self.momentPlazaView.frame = self.scrollView.bounds self.momentPlazaView.frame = self.scrollView.bounds
self.momentPlazaView.x = 0
self.followView.frame = self.scrollView.bounds self.followView.frame = self.scrollView.bounds
self.followView.x = self.view.width self.followView.x = self.view.width
} }
......
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 sign in to comment