Merge pull request #32 from maxcampolo/fix/reload

Fix/reload
This commit is contained in:
Serhii Butenko 2016-12-09 18:20:55 +02:00 committed by GitHub
commit cf3f6aaba0
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()
}