定制iPhone故事板segue不';我不能正常工作 我想加载另一个视图控制器,使当前的幻灯片出现,而新的是从底部开始的,它工作,但我没有得到子视图(按钮消失,而我只得到空白视图),如何修复它?
目前的代码是:定制iPhone故事板segue不';我不能正常工作 我想加载另一个视图控制器,使当前的幻灯片出现,而新的是从底部开始的,它工作,但我没有得到子视图(按钮消失,而我只得到空白视图),如何修复它?,iphone,controller,storyboard,segue,Iphone,Controller,Storyboard,Segue,目前的代码是: -(void)perform { UIViewController *sourceVC = (UIViewController *) self.sourceViewController; UIViewController *destinationVC = (UIViewController *) self.destinationViewController; [UIView animateWithDuration:2.0
-(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);
}];
}
可以为viewController创建两个视图,并设置第二个视图原点。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];
类似这样的东西…你确定VC已经在动画中加载了吗?你为什么使用VC?你可以设置单独视图的动画…如何在情节提要中添加另一个视图ti viewController?它不允许我添加它…嗯。。。对不起,我忘了你用故事板了