fix of separator setup
This commit is contained in:
parent
01315e2bb8
commit
e5fad7e0c2
|
|
@ -192,7 +192,7 @@ public class Segmentio: UIView {
|
|||
}
|
||||
}
|
||||
|
||||
setupHorizontalSeparator()
|
||||
setupHorizontalSeparatorIfPossible()
|
||||
setupCellWithStyle(segmentioStyle)
|
||||
segmentioCollectionView?.reloadData()
|
||||
}
|
||||
|
|
@ -200,9 +200,7 @@ public class Segmentio: UIView {
|
|||
public override func didMoveToSuperview() {
|
||||
super.didMoveToSuperview()
|
||||
|
||||
if superview != nil && segmentioOptions.horizontalSeparatorOptions != nil {
|
||||
setupHorizontalSeparator()
|
||||
}
|
||||
setupHorizontalSeparatorIfPossible()
|
||||
}
|
||||
|
||||
// MARK: Collection view setup
|
||||
|
|
@ -235,6 +233,12 @@ public class Segmentio: UIView {
|
|||
|
||||
// MARK: Horizontal separators setup
|
||||
|
||||
private func setupHorizontalSeparatorIfPossible() {
|
||||
if superview != nil && segmentioOptions.horizontalSeparatorOptions != nil {
|
||||
setupHorizontalSeparator()
|
||||
}
|
||||
}
|
||||
|
||||
private func setupHorizontalSeparator() {
|
||||
topSeparatorView?.removeFromSuperview()
|
||||
bottomSeparatorView?.removeFromSuperview()
|
||||
|
|
|
|||
Loading…
Reference in New Issue