The UIModalTransitionStyle is either Vertical, Flip or Dissolve. I would like it to be right to left or left to right, like if you click on a disclosure button on a MapKit callout or in a navigation based app.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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