diff --git a/Segmentio/Source/Segmentio.swift b/Segmentio/Source/Segmentio.swift index da082a7..ad7f709 100644 --- a/Segmentio/Source/Segmentio.swift +++ b/Segmentio/Source/Segmentio.swift @@ -253,7 +253,7 @@ open class Segmentio: UIView { bottomSeparatorView = UIView(frame: CGRect.zero) setupConstraintsForSeparatorView( separatorView: bottomSeparatorView, - originY: frame.maxY - height + originY: bounds.maxY - height ) } } @@ -271,7 +271,7 @@ open class Segmentio: UIView { item: separatorView, attribute: .top, relatedBy: .equal, - toItem: superview, + toItem: self, attribute: .top, multiplier: 1, constant: originY