iPadに次のUIPopOverControllerがあります。これは、ユニバーサル ストーリーボードを備えた iOS 8 アプリです。XCode では、このセグエを「Present as Popover」として選択しました。
このView Controllerが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)
ビューコントローラーの制約をまったく試していないので、なぜこれが起こっているのかわかりません。これを防ぐ正しい方法は何ですか?