RBSlidingPageContainerView Class Reference

Inherits from UIView
Declared in RBSlidingPageContainerView.h

Overview

A sliding container of pages.

  header

The underlying header view.

@property (nonatomic, readonly, nonnull) RBSlidingPageContainerHeaderView *header

Declared In

RBSlidingPageContainerView.h

  headerEnabled

Whether or not the header is enabled (visible). Default = false.

@property (nonatomic) BOOL headerEnabled

Declared In

RBSlidingPageContainerView.h

  panningEnabled

Whether or not the user can swipe between pages. Default = true.

@property (nonatomic) BOOL panningEnabled

Declared In

RBSlidingPageContainerView.h

  minimumSize

The minimum size of the sliding page container view.

@property (nonatomic) CGSize minimumSize

Declared In

RBSlidingPageContainerView.h

  sizeToCurrentPageOnly

Whether or not the container view sizes to fit the current page only (true) or to fit all of the pages (false). Default = false.

@property (nonatomic) BOOL sizeToCurrentPageOnly

Declared In

RBSlidingPageContainerView.h

  animator

The RBAnimator to use when sliding between pages.

@property (nonatomic, readonly, nonnull) RBAnimator *animator

Declared In

RBSlidingPageContainerView.h

  delegate

The delegate to be informed of page transition events.

@property (nonatomic, weak, nullable) id<RBSlidingPageContainerViewDelegate> delegate

Declared In

RBSlidingPageContainerView.h

  pageCount

The number of pages in the container.

@property (nonatomic, readonly) NSUInteger pageCount

Declared In

RBSlidingPageContainerView.h

– pageViewAtIndex:

Retrieves the page view at the given index.

- (nonnull UIView *)pageViewAtIndex:(NSUInteger)index

Parameters

index

The page index.

Return Value

The retrieved page view.

Declared In

RBSlidingPageContainerView.h

– pageTitleAtIndex:

Retrieves the title of the page at the given index.

- (nonnull NSString *)pageTitleAtIndex:(NSUInteger)index

Parameters

index

The page index.

Return Value

The title of the page.

Declared In

RBSlidingPageContainerView.h

– addPage:title:

Adds a new page with the given title.

- (void)addPage:(nonnull UIView *)pageView title:(nonnull NSString *)title

Parameters

pageView

The page view.

title

The title of the page.

Declared In

RBSlidingPageContainerView.h

– insertPage:title:atIndex:

Inserts a new page with the given title at the given index.

- (void)insertPage:(nonnull UIView *)pageView title:(nonnull NSString *)title atIndex:(NSUInteger)index

Parameters

pageView

The page view.

title

The title of the page.

index

The page index at which to insert.

Declared In

RBSlidingPageContainerView.h

– removePage:

Removes the page with the given view.

- (void)removePage:(nonnull UIView *)pageView

Parameters

pageView

The page view.

Declared In

RBSlidingPageContainerView.h

– removePageAtIndex:

Removes the page at the given index.

- (void)removePageAtIndex:(NSUInteger)index

Parameters

index

The page index.

Declared In

RBSlidingPageContainerView.h

– removeAllPages

Removes all pages.

- (void)removeAllPages

Declared In

RBSlidingPageContainerView.h

– setPageTitle:atIndex:

Sets the title of the page at the given index.

- (void)setPageTitle:(nonnull NSString *)title atIndex:(NSUInteger)index

Parameters

title

The title of the page.

index

The page index.

Declared In

RBSlidingPageContainerView.h

  currentPageIndex

The index of the current page.

@property (nonatomic, readonly) NSUInteger currentPageIndex

Declared In

RBSlidingPageContainerView.h

– moveToPage:animated:completion:

Moves to the page with the given view.

- (void)moveToPage:(nonnull UIView *)pageView animated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

pageView

The page view.

animated

Whether or not the transition should be animated.

completion

An optional block to be called when the transition is complete.

Declared In

RBSlidingPageContainerView.h

– moveToPageAtIndex:animated:completion:

Moves to the page at the given index.

- (void)moveToPageAtIndex:(NSUInteger)index animated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

index

The page index.

animated

Whether or not the transition should be animated.

completion

An optional block to be called when the transition is complete.

Declared In

RBSlidingPageContainerView.h

– willPeakAtIndex:

Called when a swipe gesture will reveal the page at the given index (but not select it).

- (void)willPeakAtIndex:(NSUInteger)index

Parameters

index

The page index.

Declared In

RBSlidingPageContainerView.h

– didPeakAtIndex:didBecomeCurrentPage:

Called when a swipe gesture did reveal the page at the given index (but not select it).

- (void)didPeakAtIndex:(NSUInteger)index didBecomeCurrentPage:(BOOL)didBecomeCurrentPage

Parameters

index

The page index.

didBecomeCurrentPage

Whether or not the page did become the current page.

Declared In

RBSlidingPageContainerView.h

– willMoveFromIndex:toIndex:animated:

Called when the container will move from one page to another.

- (void)willMoveFromIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex animated:(BOOL)animated

Parameters

fromIndex

The index of the page being moved away from.

toIndex

The index of the page being moved to.

animated

Whether or not the transition is animated.

Declared In

RBSlidingPageContainerView.h

– didMoveFromIndex:toIndex:animated:

Called when the container did move from one page to another.

- (void)didMoveFromIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex animated:(BOOL)animated

Parameters

fromIndex

The index of the page being moved away from.

toIndex

The index of the page being moved to.

animated

Whether or not the transition is animated.

Declared In

RBSlidingPageContainerView.h