如何在webView中提供页面卷曲动画?

Min*_*ter 0 pdf iphone uiwebview pdf-reader ios

我正在研究PDF阅读器应用程序.如果我显示pdf文件,那么我无法更改此字体大小.

所以我在UIWebView中显示ePub文件.但我的问题是如何在UIWebView中添加页面卷曲动画,如iBook和kindle应用程序.

Ani*_*ari 6

我创建了一个名为myWebView的UIWebView,点击按钮后,webl上将显示卷曲效果: -

    -(IBAction) nextPageAnimationForWebView{        
    CATransition *animation = [CATransition animation];
    [animation setDelegate:self];
    [animation setDuration:1.0f];
    animation.startProgress = 0.5;
    animation.endProgress   = 1;
    [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
    [animation setType:@"pageCurl"];

        //[animation setType:kcat]; 
        [animation setSubtype:kCATransitionMoveIn];

    [animation setRemovedOnCompletion:NO];
    [animation setFillMode: @"extended"];
    [animation setRemovedOnCompletion: NO];
    [[myWebView layer] addAnimation:animation forKey:@"WebPageCurl"]; 

}
Run Code Online (Sandbox Code Playgroud)

请告诉我这是否解决了您的问题.