From 05fb10bee789010b8d0af42fa981ab5a0a1c3e2c Mon Sep 17 00:00:00 2001 From: Max Campolo Date: Fri, 9 Dec 2016 10:49:16 -0500 Subject: [PATCH] Reload collection view in reloadSegmentio method --- Segmentio/Source/Segmentio.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Segmentio/Source/Segmentio.swift b/Segmentio/Source/Segmentio.swift index 4cc123d..b4797b9 100644 --- a/Segmentio/Source/Segmentio.swift +++ b/Segmentio/Source/Segmentio.swift @@ -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() }