开发者

how to show image pages not pdf in page flipper (AFKPageFlipper api)

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;

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜