2012-05-17 3 views
0

ePub 파일을 읽는 ePub 리더를 만들고 있습니다. 실제 슬라이드와 유사한 페이지 슬라이드 효과를 구현하고 싶습니다. For example.iOS에서 페이지 슬라이드 효과를 구현하는 방법

어떤 애니메이션인가요? 이 작동하지 않습니다

- (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]; 
    } 

} 

답변

관련 문제