Reload collection view in reloadSegmentio method
This commit is contained in:
parent
50ecb102e7
commit
05fb10bee7
|
|
@ -43,7 +43,7 @@ open class Segmentio: UIView {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
open fileprivate(set) var segmentioItems = [SegmentioItem]()
|
||||
fileprivate var segmentioCollectionView: UICollectionView?
|
||||
fileprivate var segmentioOptions = SegmentioOptions()
|
||||
|
|
@ -323,6 +323,7 @@ open class Segmentio: UIView {
|
|||
// MARK: Reload segmentio
|
||||
public func reloadSegmentio() {
|
||||
segmentioCollectionView?.collectionViewLayout.invalidateLayout()
|
||||
segmentioCollectionView?.reloadData()
|
||||
scrollToItemAtContext()
|
||||
moveShapeLayerAtContext()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue