【发布时间】:2014-09-24 19:06:49
【问题描述】:
我在 iPad 上有以下 UIPopOverController。这是一个带有通用故事板的 iOS 8 应用程序。在 XCode 中,我选择了这个的 segue 为“Present as Popover”。
只要这个视图控制器呈现一个 UIAlertController,就会发生这种情况:
弹出框缩小到一个奇怪的大小。 UIAlertController 从弹出窗口显示为:
var alert = UIAlertController(title: NSLocalizedString("Error", comment: "A simple error label"), message: NSLocalizedString("This account is already linked to the app.", comment: "A string describing the problem"), preferredStyle: .Alert)
var action = UIAlertAction(title: NSLocalizedString("OK", comment: "Simple string"), style: UIAlertActionStyle.Default, handler: { (action: UIAlertAction!) in
self.usernameTextField.becomeFirstResponder()
self.passwordTextField.text = ""
return
})
alert.addAction(action)
self.presentViewController(alert, animated: true, completion: nil)
我根本没有玩过视图控制器的约束,所以我不知道为什么会这样。防止这种情况发生的正确方法是什么?
【问题讨论】:
-
您的问题有解决方案吗?因为我有同样的问题。
-
很遗憾没有。还在找。
-
显然这个错误会在 iOS 9.0 中回归
标签: storyboard ios8 uipopovercontroller uialertcontroller universal-storyboard