开发者

UIModalTransitionStyle horizontal movement

The UIModalTransitionStyle is either Vertical, Flip or Dissolve. I would like it to be right to left or left to right, like if you cl开发者_如何学运维ick on a disclosure button on a MapKit callout or in a navigation based app.


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜