0

ePubファイルを読み取るePubリーダーを作成しています。物理的な本に似たページスライド効果を実装したいと思います。たとえば

これは何のアニメーションですか?これは機能しません:

- (void)loadPage{

[UIView beginAnimations:nil context:nil]; 
    //change to set the time 
    [UIView setAnimationDuration:1]; 
    [UIView setAnimationBeginsFromCurrentState:YES]; 
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; 

    // do your view swapping here 
    [UIView commitAnimations];
}

スワイプ時:

- (void)swipeRightAction:(id)ignored
{
    NSLog(@"Swipe Right");
    if (_pageNumber>0) {

        _pageNumber--;
        [self loadPage];
    }

}

- (void)swipeLeftAction:(id)ignored
{
    NSLog(@"Swipe Left");

    if ([self._ePubContent._spine count]-1>_pageNumber) {

        _pageNumber++;
        [self loadPage];
    }

}
4

1 に答える 1

1

私はサードパーティのAPIで同じことをしました。以下のURLから参照できます

https://github.com/jemmons/PageCurl

https://github.com/xissburg/XBPageCurl

https://github.com/brow/leaves

于 2012-05-17T05:46:41.187 に答える