的iOS - 编程模式赛格瑞动画(例如倒装)(iOS - programmatic modal s

2019-07-29 17:40发布

我知道我可以在这样的代码做一个模式SEGUE:

[presentModalViewController:my_view, animated:YES];

但我怎么指定淡入或水平/垂直翻转编程?

谢谢,Pachun

Answer 1:

将此属性设置为您的viewController: modalTransitionStyle

从苹果DOC UIModalTransitionStyle

  typedef enum { UIModalTransitionStyleCoverVertical = 0, 
                 UIModalTransitionStyleFlipHorizontal,
                 UIModalTransitionStyleCrossDissolve,  
                  UIModalTransitionStylePartialCurl,} UIModalTransitionStyle;


文章来源: iOS - programmatic modal segue with animation (such as flip)