UIModalTransitionStyle是Vertical,Flip或Dissolve。我希望它向左或从左到右,就像您点击MapKit标注或基于导航的应用程序上的公开按钮一样。
答案 0 :(得分:5)
这不可能作为模态viewController的转换,但您可以使用类型为kCATransitionMoveIn
或kCATransitionPush
且子类型为kCATransitionFromRight
的CATransition
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