iOS - programmatic modal segue with animation (suc

2019-04-10 17:23发布

I know I can do a modal segue in code like this:

[presentModalViewController:my_view, animated:YES];

but how do I specify a fade in or horizontal/vertical flip programmatically?

Thanks, Pachun

1条回答
等我变得足够好
2楼-- · 2019-04-10 17:34

set this property to your viewController: modalTransitionStyle

UIModalTransitionStyle from apple doc

  typedef enum { UIModalTransitionStyleCoverVertical = 0, 
                 UIModalTransitionStyleFlipHorizontal,
                 UIModalTransitionStyleCrossDissolve,  
                  UIModalTransitionStylePartialCurl,} UIModalTransitionStyle;
查看更多
登录 后发表回答