Add horizontal separator none.

This commit is contained in:
pauluhn 2017-08-17 16:55:55 -05:00
parent 8a21e29e89
commit 85bed4548b
2 changed files with 5 additions and 1 deletions

View File

@ -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:

View File

@ -56,7 +56,7 @@ public struct SegmentioState {
// MARK: - Horizontal separator
public enum SegmentioHorizontalSeparatorType {
case none
case top
case bottom
case topAndBottom