Swift2 通过Swift/Storyboard将UIAlertController设置为仅在容器视图中显示
是否可以仅在iPad屏幕上的较小上下文中调用Swift2 通过Swift/Storyboard将UIAlertController设置为仅在容器视图中显示,swift2,ios9,xcode7,uialertcontroller,Swift2,Ios9,Xcode7,Uialertcontroller,是否可以仅在iPad屏幕上的较小上下文中调用UIAlertController(例如,对于iPhone模拟器)?我有一个带有UIViewController的容器视图,我正在使用: self.definesPresentationContext = true alertController.modalPresentationStyle = UIModalPresentationStyle.OverCurrentContext self.presentViewController(aler
UIAlertController
(例如,对于iPhone模拟器)?我有一个带有UIViewController
的容器视图,我正在使用:
self.definesPresentationContext = true
alertController.modalPresentationStyle = UIModalPresentationStyle.OverCurrentContext
self.presentViewController(alertController, animated: true, completion: nil)
我还尝试过从故事板设置上下文-对于标准的UIViewController
来说,这两种方法都很好,但是没有什么能阻止UIAlertController
占据整个屏幕。有什么建议吗