i had found the page flipper code AFKPa开发者_Python百科geFlipper from github. i want to show image instead of pdf pages which is shown in code example. guys have you any idea how to replace pdf pages into images.
please suggest me.
thanks
Have a look at the example included in the project. You have to implement - (UIView *) viewForPage:(NSInteger) page inFlipper:(AFKPageFlipper *) pageFlipper
in the AFKPageFlipperDataSource
. In the MainController.m (from the example) you can find a example.
Your new code for images could look like this:
- (UIView *) viewForPage:(NSInteger) page inFlipper:(AFKPageFlipper *) pageFlipper {
// Note that page numbers start at 1 and not 0
switch (page) {
case 1:
//return a view with an image
break;
case 2:
//return a view with an image
break;
default:
break;
}
return nil;
}
精彩评论