RichieSwiper

Objective-C

@protocol RichieSwiper <NSObject>

-(CGRect) frameForPageAtIndex:(NSInteger)pageIndex; //!< Calculated frame for given pageIndex. Useful for returning views with correct frame from DataSource.


@property (nonatomic) NSInteger numberOfPages;


/**
 The index of the page currently being displayed in the swiper.
 Setting this property is same as calling -setCurrentPageIndex:newPageIndex animated:NO.
 Changing current page index programmatically will cause delegate notifications of page disappearing and appearing called normally.
 */
@property (nonatomic) NSInteger currentPageIndex;

/**
 Changes the page currently being displayed in the swiper. If animated is YES, the change will happen with a scrolling animation.
 
 Changing current page index programmatically will cause delegate notifications of page disappearing and appearing called normally.
 */
-(void) setCurrentPageIndex:(NSInteger)newPageIndex animated:(BOOL)animated;



/**
 Causes DataSource to be queried and all current data to be discarded. Analogous to UITableView method -reloadData.
 
 NOTE: Calling this won't cause -swiper:pageDidDisappear: delegate method to be called on possibly disappearing page,
 but -swiper:pageDidAppear: will be called for the new page. If all page data doesn't actually change underneath,
 the newly appearing page could've actually been the previously already appeared page.
 */
-(void) reloadData;


/**
 Will cause DataSource to be queried if necessary (when the newly inserted page
 needs to be actually inserted to view hierarchy).
 */
-(void) insertPageAtIndex:(NSInteger)pageIndex;
-(void) removePageAtIndex:(NSInteger)pageIndex;

@end

Swift

protocol RichieSwiper : NSObjectProtocol

Undocumented

  • Undocumented

    Declaration

    Objective-C

    - (CGRect)frameForPageAtIndex:(NSInteger)pageIndex;

    Swift

    func frameForPage(at pageIndex: Int) -> CGRect
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) NSInteger numberOfPages

    Swift

    var numberOfPages: Int { get set }
  • The index of the page currently being displayed in the swiper. Setting this property is same as calling -setCurrentPageIndex:newPageIndex animated:NO. Changing current page index programmatically will cause delegate notifications of page disappearing and appearing called normally.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger currentPageIndex;

    Swift

    var currentPageIndex: Int { get set }
  • Changes the page currently being displayed in the swiper. If animated is YES, the change will happen with a scrolling animation.

    Changing current page index programmatically will cause delegate notifications of page disappearing and appearing called normally.

    Declaration

    Objective-C

    - (void)setCurrentPageIndex:(NSInteger)newPageIndex animated:(BOOL)animated;

    Swift

    func setCurrentPageIndex(_ newPageIndex: Int, animated: Bool)
  • Causes DataSource to be queried and all current data to be discarded. Analogous to UITableView method -reloadData.

    NOTE: Calling this won’t cause -swiper:pageDidDisappear: delegate method to be called on possibly disappearing page, but -swiper:pageDidAppear: will be called for the new page. If all page data doesn’t actually change underneath, the newly appearing page could’ve actually been the previously already appeared page.

    Declaration

    Objective-C

    - (void)reloadData;

    Swift

    func reloadData()
  • Will cause DataSource to be queried if necessary (when the newly inserted page needs to be actually inserted to view hierarchy).

    Declaration

    Objective-C

    - (void)insertPageAtIndex:(NSInteger)pageIndex;

    Swift

    func insertPage(at pageIndex: Int)
  • Undocumented

    Declaration

    Objective-C

    -(void) removePageAtIndex:(NSInteger)pageIndex;

    Swift

    func removePage(at pageIndex: Int)