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