comments
This commit is contained in:
parent
8c9ab45951
commit
9178385e6d
@ -148,6 +148,7 @@ import Foundation
|
||||
/// Should be used to refresh the layout of the collection view. Updates flexible padding.
|
||||
open func invalidateCollectionLayout() {
|
||||
self.collectionView?.collectionViewLayout.invalidateLayout()
|
||||
// TODO: Improve this workaround (autolayout for cells happens async so contentSize isn't accurate immediately)
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
|
||||
self.updateFlexibleSpace()
|
||||
})
|
||||
@ -156,6 +157,7 @@ import Foundation
|
||||
/// Should be used to reload the data of the collection view. Updates flexible padding.
|
||||
open func reloadCollectionData() {
|
||||
collectionView?.reloadData()
|
||||
// TODO: Improve this workaround (autolayout for cells happens async so contentSize isn't accurate immediately)
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
|
||||
self.updateFlexibleSpace()
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user