不同的UIViewController模式过渡到另一个VC与不同的动画
问题描述:
这里是我的问题,让说,我有UIViewController的ABC d ... 目前我使用的是默认transiation animiation为所有VC模式石棉水泥,显示为 - > 不同的UIViewController模式过渡到另一个VC与不同的动画
我想要的是...让用户选择他们喜欢使用什么样的转换动画..对于所有的VC模式转换动画... 我想一些代码需要添加在这里的某些地方? - >
- (IBAction)cardAction:(id)sender {
UIImage *img = [(UIButton *)sender currentBackgroundImage];
[self performSegueWithIdentifier:@"cardSegue" sender:img];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if ([segue.identifier isEqualToString:@"cardSegue"]) {
UIImage * img = (UIImage *)sender;
ResultViewController *viewcontroller = [segue destinationViewController];
viewcontroller.img = img;
}
}
请帮助..
答
一个赛格瑞允许您定义的故事板的过渡,但要让用户定义的过渡。 UIStoryboardSegue不会让你这样做,所以你将需要自己执行转换。
有执行上使用不同的风格转换在这里一个很好的答案:
How to change the Push and Pop animations in a navigation based app
与其说performSegueWithIdentifier的,你应该使用代码从答案来进行过渡。
答