UIModalTransitionStyle horizontal movement

亡梦爱人 提交于 2019-12-01 00:24:35

This is impossible as transition for a modal viewController, but you could use a CATransition with a type of kCATransitionMoveIn or kCATransitionPush and a subtype of kCATransitionFromRight

CATransition* trans = [CATransition animation];
trans.type = kCATransitionPush;
trans.subtype = kCATransitionFromRight;
trans.duration = 0.5;

[newView.layer addAnimation:trans forKey:@"PushFromRightEffect"];

[someOtherView addSubview:newView];
// Coded in Browser not tested
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!