I have the following UIPopOverController on an iPad. This is an iOS 8 app with versatile demos. In Xcode, I selected this segment as "Present as Popover".

Whenever this view controller presents a UIAlertController, this happens:

The portport shrinks to a weird size. UIAlertController is presented from the list:
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)
I didn't play with the limitations of view controllers at all, so I have no idea why this is happening. What is the right way to prevent this?
source
share