Index

RBSlidingView.h

Protocols

Classes


RBSlidingView

A sliding container of pages.

Properties

Whether or not the user can swipe between pages. Default = true.
public panningEnabled Bool { get set }

The minimum size of the sliding page container view.
public minimumSize CGSize { get set }

Whether or not the container view sizes to fit the current page only (true) or to fit all of the pages (false). Default = false.
public sizeToCurrentPageOnly Bool { get set }

The RBAnimator to use when sliding between pages.
public animator RBAnimator { get }

The delegate to be informed of page transition events.
public weak delegate RBSlidingViewDelegate? { get set }

The number of pages in the container.
public pages int { get }

The index of the current page.
public currentPageIndex int { get }

Functions

Retrieves the page view at the given index.
@param index : The page index.
@returns The retrieved page view.
- (nonnull UIView *)pageViewAtIndex:(NSInteger)index;

Adds a new page with the given title.
@param pageView : The page view.
- (void)addPage:(nonnull UIView *)pageView;

Inserts a new page with the given title at the given index.
@param pageView : The page view.
@param index : The page index at which to insert.
- (void)insertPage:(nonnull UIView *)pageView atIndex:(NSInteger)index;

Removes the page with the given view.
@param pageView : The page view.
- (void)removePage:(nonnull UIView *)pageView;

Removes the page at the given index.
@param index : The page index.
- (void)removePageAtIndex:(NSInteger)index;

Moves to the page with the given view.
@param pageView : The page view.
@param animated : Whether or not the transition should be animated.
@param completion : An optional block to be called when the transition is complete.
- (void)moveToPage:(nonnull UIView *)pageView animated:(BOOL)animated completion:(nullable dispatch_block_t)completion;

Moves to the page at the given index.
@param index : The page index.
@param animated : Whether or not the transition should be animated.
@param completion : An optional block to be called when the transition is complete.
- (void)moveToPageAtIndex:(NSInteger)index animated:(BOOL)animated completion:(nullable dispatch_block_t)completion;

Called when a swipe gesture will reveal the page at the given index (but not select it).
@param index : The page index.
- (void)willPeakAtIndex:(NSInteger)index;

Called when a swipe gesture did reveal the page at the given index (but not select it).
@param index : The page index.
@param didBecomeCurrentPage : Whether or not the page did become the current page.
- (void)didPeakAtIndex:(NSInteger)index didBecomeCurrentPage:(BOOL)didBecomeCurrentPage;

Called when the container will move from one page to another.
@param fromIndex : The index of the page being moved away from.
@param toIndex : The index of the page being moved to.
@param animated : Whether or not the transition is animated.
- (void)willMoveFromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex animated:(BOOL)animated;

Called when the container did move from one page to another.
@param fromIndex : The index of the page being moved away from.
@param toIndex : The index of the page being moved to.
@param animated : Whether or not the transition is animated.
- (void)didMoveFromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex animated:(BOOL)animated;