如何从左/右移动到下一个ViewController从左到右
在objective-C中,我想从左/右移动到下一个ViewController,从左到右。 (不要用推)如何从左/右移动到下一个ViewController从左到右
我怎样才能做模式从左/右到左/右的屏幕过渡?
你可以做 首先,你需要导入
#import <QuartzCore/QuartzCore.h>
是
NextViewController *nextVC = [[NextViewController alloc] initWithNibName:@"NextViewController" bundle:nil]];
CATransition *animation = [CATransition animation];
[animation setDuration:0.5];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromLeft];
[[nextVC.view layer] addAnimation:animation forKey:@"MoveNextView"];
[self presentViewController:nextVC animated:NO completion:nil];
谢谢你的回答。但是VC没有出现带推动画,只能立即出现.... – bao
但是在你问的问中你不要用push – user3182143
对不起,我的意思是“推动画”正在向左从右到左...... – bao
我搜索如何做到这一点在互联网上之后,但我能找到像翻转动画,只有等画面过渡喂食。 – bao