Reload collection view in reloadSegmentio method

This commit is contained in:
Max Campolo 2016-12-09 10:49:16 -05:00
parent 50ecb102e7
commit 05fb10bee7
1 changed files with 2 additions and 1 deletions

View File

@ -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()
}