RichieSwiperDelegate

Objective-C

@protocol RichieSwiperDelegate <NSObject>

@optional

-(void) swiper:(id<RichieSwiper>)swiper pageDidAppear:(NSInteger)pageIndex userGesture:(BOOL)userGesture;
-(void) swiper:(id<RichieSwiper>)swiper pageDidDisappear:(NSInteger)pageIndex;

/**
 leftPage or rightPage can be -1 if it's not a valid page index, such as when past begin or end of swiper.
 Percentage ([-1, 1]) is the completeness of panning transition from left page to right page. Negative percentage values mean percentage is from rightPage to leftPage, positive percentage values mean distance is from leftPage to rightPage. When a page is invalid (-1), percentage is from the valid page.
 
 For example, leftPage == -1 and rightPage == 0, percentage will be negative (or zero), because panning is from the rightPage to left. When leftPage == <last page index> and rightPage == -1, percentage will be positive (or zero), signifying panning is to right from leftPage.
 
 Also, when leftPage == 1 and rightPage == 2, percentage == 0.75 and percentage == -0.25 are the same thing: panning transition is 75% complete from the left page to the right page.
 */
-(void) swiper:(id<RichieSwiper>)swiper didPanToPercent:(float)percent betweenPage:(NSInteger)leftPage andPage:(NSInteger)rightPage;

@end

Swift

protocol RichieSwiperDelegate : NSObjectProtocol

Undocumented

  • Undocumented

    Declaration

    Objective-C

    -(void) swiper:(id<RichieSwiper>)swiper pageDidAppear:(NSInteger)pageIndex userGesture:(BOOL)userGesture;

    Swift

    optional func swiper(_ swiper: (any RichieSwiper)!, pageDidAppear pageIndex: Int, userGesture: Bool)
  • Undocumented

    Declaration

    Objective-C

    -(void) swiper:(id<RichieSwiper>)swiper pageDidDisappear:(NSInteger)pageIndex;

    Swift

    optional func swiper(_ swiper: (any RichieSwiper)!, pageDidDisappear pageIndex: Int)
  • leftPage or rightPage can be -1 if it’s not a valid page index, such as when past begin or end of swiper. Percentage ([-1, 1]) is the completeness of panning transition from left page to right page. Negative percentage values mean percentage is from rightPage to leftPage, positive percentage values mean distance is from leftPage to rightPage. When a page is invalid (-1), percentage is from the valid page.

    For example, leftPage == -1 and rightPage == 0, percentage will be negative (or zero), because panning is from the rightPage to left. When leftPage == and rightPage == -1, percentage will be positive (or zero), signifying panning is to right from leftPage.

    Also, when leftPage == 1 and rightPage == 2, percentage == 0.75 and percentage == -0.25 are the same thing: panning transition is 75% complete from the left page to the right page.

    Declaration

    Objective-C

    - (void)swiper:(id<RichieSwiper>)swiper
        didPanToPercent:(float)percent
            betweenPage:(NSInteger)leftPage
                andPage:(NSInteger)rightPage;

    Swift

    optional func swiper(_ swiper: (any RichieSwiper)!, didPanToPercent percent: Float, betweenPage leftPage: Int, andPage rightPage: Int)