update fix
This commit is contained in:
parent
8a9d85a83c
commit
c6b8eacff4
@ -45,9 +45,7 @@ open class CollectionViewCell: UICollectionViewCell, MoleculeViewProtocol, MVMCo
|
||||
|
||||
open func updateView(_ size: CGFloat) {
|
||||
containerHelper.updateViewMargins(contentView, model: model, size: size)
|
||||
DispatchQueue.main.async {
|
||||
print("leading \(self.contentView.directionalLayoutMargins.leading)")
|
||||
}
|
||||
(molecule as? MVMCoreViewProtocol)?.updateView(size)
|
||||
}
|
||||
|
||||
open func reset() {
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
/// A view controller that has three main layers, a header, collection rows, and a footer. The header is added as a supplement header to the first section, and the footer is added as a supplement footer to the last section. This view controller allows for flexible space between the three layers to fit the screeen.
|
||||
@objc open class ThreeLayerCollectionViewController: ProgrammaticCollectionViewController, UICollectionViewDelegateFlowLayout {
|
||||
|
||||
// The three main views
|
||||
private var topView: UIView?
|
||||
private var bottomView: UIView?
|
||||
private var headerView: ContainerCollectionReusableView?
|
||||
@ -69,7 +69,7 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: - MFViewController
|
||||
//MARK: - ViewController
|
||||
open override func updateViews() {
|
||||
super.updateViews()
|
||||
let width = view.bounds.width
|
||||
@ -79,6 +79,11 @@ import Foundation
|
||||
if let bottomView = bottomView as? MVMCoreViewProtocol {
|
||||
bottomView.updateView(width)
|
||||
}
|
||||
if let cells = collectionView?.visibleCells {
|
||||
for cell in cells {
|
||||
(cell as? MVMCoreViewProtocol)?.updateView(width)
|
||||
}
|
||||
}
|
||||
invalidateCollectionLayout()
|
||||
}
|
||||
|
||||
@ -106,7 +111,7 @@ import Foundation
|
||||
return nil
|
||||
}
|
||||
|
||||
/// can override to return a minimum fill space.
|
||||
/// can override to return a minimum fill space. 0 default
|
||||
open func minimumFillSpace() -> CGFloat {
|
||||
return 0
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user