【发布时间】:2014-05-24 19:51:01
【问题描述】:
对于我的 iPad 版本的应用程序,我想通过单击按钮以 UIPopoverController 的形式打开我的 UIViewController。因此,视图控制器打开的真实代码如下。如何轻松地将此类代码转换为将UIViewController 作为UIPopoverController 打开?
代码:
UIStoryboard *sb = [UIStoryboard storyboardWithName:[[NSBundle mainBundle].infoDictionary objectForKey:@"UIMainStoryboardFile"] bundle:[NSBundle mainBundle]];
UIViewController *aboutView = [sb instantiateViewControllerWithIdentifier:@"AboutViewController"];
aboutView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:aboutView animated:YES completion:NULL];
【问题讨论】:
-
只使用情节提要中的弹出框转场
标签: ios iphone objective-c xcode uiviewcontroller