2012-01-11 64 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让你有两页中加入视图中间