NEUPagingSegmentedControl

@interface NEUPagingSegmentedControl

A horizontal segmented control that works with UIScrollView paging.

  • The index of the segment that’s currently highlighted.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) int currentIndex;
  • The object that acts as the delegate of the paging segmented control.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<NEUPagingSegmentedControlDelegate> delegate;
  • Set up paging segments with an array of titles.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSArray *segmentTitles
  • The scroll view that moves its contents along with the indicator.

    Declaration

    Objective-C

    @property (nonatomic, strong) UIScrollView *scrollView
  • The indicator view below the segment titles.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIView *indicatorView
  • Initializes a paging segmented control with given parameters.

    Declaration

    Objective-C

    - (instancetype)initWithFrame:(id)frame
                    segmentTitles:(id)titles
                       scrollView:(id)scrollView;

    Parameters

    frame

    The frame rectangle for the view.

    titles

    An array of NSString objects for segment titles.

    scrollView

    The scroll view that corresponds to the paging indicator.

    Return Value

    An initialized paging segmented control.