2016-06-14 234 views
0

我想从一个视图控制器转到另一个使用页面卷曲动画;但是当我的第二个控制器加载时,它隐藏了它的集合视图。这是我的代码:curlUp和curlDown从一个视图控制器到另一个视图的动画

OffersVC *Offers = [[OffersVC alloc]init]; 
    Offers = [self.storyboard instantiateViewControllerWithIdentifier:@"Offers"]; 
    [UIView beginAnimations:@"flipview" context:nil]; 
    [UIView setAnimationDuration:2]; 
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; 
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; 
    [self.view addSubview:Offers.view]; 

    [UIView commitAnimations]; 

回答

1

尝试添加动画如下检查

UIView *mainview = self.view.window; 

OffersVC *Offers = [[OffersVC alloc]init]; 
Offers = [self.storyboard instantiateViewControllerWithIdentifier:@"Offers"]; 

[UIView transitionWithView:mainview 
       duration:kAnimationViewTransition 
       options:UIViewAnimationOptionTransitionCurlUp 
      animations:^{ 
       [self.navigationController.view removeFromSuperview]; 
       [mainview addSubview: offers.view]; 
      } 
      completion:^(BOOL finished) { 
       [self presentModalViewController:offers animated:NO]; 
      } 
]; 
+1

虽然这个答案可能确实解决了原来的问题。如果你提供一些解释和上下文,这将是非常有帮助的。 – Shade

相关问题