2013-04-25 34 views
9

我需要在iOS應用中實現頁面翻轉效果。但是效果不應該像UIPageViewController和我檢查過的其他第三方庫那樣使頁面捲曲。該頁面應該是一個嚴格的頁面,而不是該書的頁面。我必須執行如下圖所示的內容。iphone:如何實現無捲曲的翻頁效果?

enter image description here

我真的很感激,如果任何人能提供任何建議或示例代碼。

預先感謝您!

+1

你應該看看http://markpospesel.wordpress.com/tag/catransform3d/瞭解更多信息 – 2013-04-25 06:55:53

+0

你能告訴我該應用程序的名稱,你看過這個動畫 – Leena 2013-04-25 07:04:33

+0

@Leena它還沒有在appstore中。我正在爲此工作。 – 2013-04-25 08:53:53

回答

2

,你可以這樣做:

[UIView beginAnimations:@"View Flip" context:nil]; 
[UIView setAnimationDuration:0.3]; 
[UIView setAnimationCurve:UIViewAnimationTransitionFlipFromLeft]; 
[UIView setAnimationTransition: 
UIViewAnimationTransitionCurlUp forView:self.view cache:NO]; 
[UIView commitAnimations]; 
1

這將是對你有幫助。

-(void) animateMe:(UIViewAnimationTransition)style 
{ 
    [self playCardSound]; 
    [UIView beginAnimations:@"flipview" context:nil]; 
    [UIView setAnimationDuration:0.5]; 
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; 
    [UIView setAnimationTransition: style forView:self.view cache:YES]; 
    [UIView commitAnimations]; 
} 

這樣稱呼它:

[self animateMe:UIViewAnimationTransitionFlipFromLeft]; 
[self animateMe:UIViewAnimationTransitionFlipFromRight];