I have a very basic alert view
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Exit" message:@"Please enter the password." delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
alertView.tag = 2;
alertView.alertViewStyle = UIAlertViewStyleSecureTextInput;
[alertView textFieldAtIndex:0].delegate = self;
[alertView show];
If I comment setting the UIAlertViewStyleSecureTextInput
it works fine but if I left I get a crash when trying to show the alert view:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The layout constraints still need update after sending -updateConstraints to <_UIKeyboardLayoutAlignmentView: 0x155289c0; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = <CALayer: 0x1558f510>>.
_UIKeyboardLayoutAlignmentView or one of its superclasses may have overridden -updateConstraints without calling super. Or, something may have dirtied layout constraints in the middle of updating them. Both are programming errors.'
I'm positive that I'm not modifying the constraints of the UIAlertView
though I do have a lot of constraints on the rest of the layout.
Why would simply having a text field on a UIAlertView
cause the constraint crash?