自定义iPhone故事板segue无法正常工作

问题描述:

我想加载另一个视图控制器,以便当新的一个来自底部时,它当前滑动,它的工作原理,但我没有得到子视图(按钮消失,我只得到空白视图),如何解决它?自定义iPhone故事板segue无法正常工作

当前的代码:

-(void)perform { 
    UIViewController *sourceVC = (UIViewController *) self.sourceViewController; 
    UIViewController *destinationVC = (UIViewController *) self.destinationViewController; 

    [UIView animateWithDuration:2.0 
        animations:^{ 
         destinationVC.view.frame=CGRectMake(destinationVC.view.frame.origin.x, 480, destinationVC.view.frame.size.width, destinationVC.view.frame.size.height); 
         sourceVC.view.transform=CGAffineTransformMakeTranslation(0, -480); 
         destinationVC.view.transform=CGAffineTransformMakeTranslation(0, -480); 

        }]; 

} 
+0

你确定VC已经加载动画内吗?你为什么使用VC? U可以为单独的视图设置动画... – Injectios 2012-03-16 09:19:02

+0

这是什么意思? – 1337code 2012-03-16 09:23:51

您可以创建2次为您的viewController,并设置第二种观点origin.y = window.height 然后动画这样的 -

CGRect outFrame = CGRectMake(0, 320, 320, 322); 

[UIView animateWithDuration:0.50f 
         delay:delay 
        options:UIViewAnimationOptionCurveEaseInOut 
       animations:^{ 
        fromView.frame = outFrame; 
        toView.frame = CGRectMake(0, 0, 320, 322); 
       } completion:nil]; 

像这...

+0

如何在故事板中添加另一个视图ti viewController? 它不允许我添加它... – 1337code 2012-03-16 09:56:31

+0

毫米...对不起,我忘了你使用故事板 – Injectios 2012-03-16 10:10:26