From 85bed4548be731923793cc94a8250b82bee5c5bd Mon Sep 17 00:00:00 2001 From: pauluhn Date: Thu, 17 Aug 2017 16:55:55 -0500 Subject: [PATCH] Add horizontal separator none. --- Segmentio/Source/Segmentio.swift | 4 ++++ Segmentio/Source/SegmentioOptions.swift | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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