diff --git a/SegmentedControl/SegmentedControl.swift b/SegmentedControl/SegmentedControl.swift index 900220a..2d95280 100644 --- a/SegmentedControl/SegmentedControl.swift +++ b/SegmentedControl/SegmentedControl.swift @@ -90,6 +90,15 @@ open class SegmentedControl: UIControl { } } open fileprivate(set) var isLongPressActivated = false + open var scrollContentInset: UIEdgeInsets { + return scrollView.contentInset + } + open var scrollContentSize: CGSize { + return scrollView.contentSize + } + open var scrollContentOffset: CGPoint { + return scrollView.contentOffset + } fileprivate lazy var scrollView: SCScrollView = { let scrollView = SCScrollView() @@ -153,6 +162,25 @@ open class SegmentedControl: UIControl { } } + open func rectForSegment(at index: Int) -> CGRect? { + guard 0..