2012-01-11 86 views
2

在我的應用程序,我有一個頁面捲曲效果。頁面捲曲效果在縱向模式下正常工作,而在橫向模式下,頁面捲曲結束髮生在i pad的角落處。風景模式頁面捲曲問題

在橫向模式我希望頁面在中途走散了,如下圖所示。 enter image description here

但我的頁面捲曲效果看上去如下圖所示。 enter image description here

我使用下面的代碼:

-(void)PresentView 
{ 
    [UIView animateWithDuration:1.0 animations:^ 
    { 
         CATransition *animation = [CATransition animation]; 

         [animation setDelegate:self]; 
         [animation setDuration:0.7]; 

         [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; 

         animation.type = @"pageCurl"; 

         animation.fillMode = kCAFillModeForwards; 
         animation.endProgress = 0.65; 

         [animation setRemovedOnCompletion:NO]; 
         [m_container.layer addAnimation:animation forKey:@"pageCurlAnimation"]; 

         [m_container addSubview:self]; 
         ;} 

    ];  
} 

我如何在橫向模式下的頁面捲曲動畫作爲第一個數字?

+0

它可能有助於你https://github.com/lomanf/PaperStack也看到這個鏈接http://api.mutado.com/mobile/paperstack/ – 2012-01-11 05:06:34

回答

0

您需要的UIPageViewController兩個屬性調整:

  • 套裝doubleSidedYES,使每個頁面有內容在其兩側的
  • 設置spineLocationUIPageViewControllerSpineLocationMid讓你有兩頁中加入視圖中間