定制Segue公司与UIViewAnimationOptionTransitionCurlDown
问题描述:
我想创建一个自定义SEGUE交换ViewControllers用卷缩的动画,但我不能找到一种方法,会是什么 - 这个(无效)执行?定制Segue公司与UIViewAnimationOptionTransitionCurlDown
我有了这个
-(void)perform{
UIViewController *dst = [self destinationViewController];
UIViewController *src = [self sourceViewController];
[UIView beginAnimations:nil context:nil];
//change to set the time
[UIView setAnimationDuration:1];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:src.view cache:YES];
[UIView commitAnimations];
}
但我没有得到改变看法,反正感谢您的帮助!
答
没关系,我解决了这个问题,备案,我不得不做的唯一的事情是添加导航控制器,然后我可以使用自定义塞格斯像:
- (void) perform {
UIViewController *src = (UIViewController *) self.sourceViewController;
UIViewController *dst = (UIViewController *) self.destinationViewController;
[UIView transitionWithView:src.navigationController.view duration:0.3
options:UIViewAnimationOptionTransitionFlipFromBottom
animations:^{
[src.navigationController pushViewController:dst animated:NO];
}
completion:NULL];
}