diff --git a/Segmentio/Source/Segmentio.swift b/Segmentio/Source/Segmentio.swift index b4797b9..da082a7 100644 --- a/Segmentio/Source/Segmentio.swift +++ b/Segmentio/Source/Segmentio.swift @@ -112,6 +112,8 @@ open class Segmentio: UIView { let separatorHeight = horizontalSeparatorOptions.height switch horizontalSeparatorOptions.type { + case .none: + separatorsHeight = 0 case .top: collectionViewFrameMinY = separatorHeight separatorsHeight = separatorHeight @@ -511,6 +513,8 @@ open class Segmentio: UIView { let isIndicatorTop = indicatorOptions.type == .top switch horizontalSeparatorOptions.type { + case .none: + break case .top: indicatorPointY = isIndicatorTop ? indicatorPointY + separatorHeight : indicatorPointY case .bottom: diff --git a/Segmentio/Source/SegmentioOptions.swift b/Segmentio/Source/SegmentioOptions.swift index 9c6f641..41cd185 100644 --- a/Segmentio/Source/SegmentioOptions.swift +++ b/Segmentio/Source/SegmentioOptions.swift @@ -56,7 +56,7 @@ public struct SegmentioState { // MARK: - Horizontal separator public enum SegmentioHorizontalSeparatorType { - + case none case top case bottom case topAndBottom