Application error while using UIAlertViewStyleSecureTextInput

I have a very simple 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 out the setting UIAlertViewStyleSecureTextInput

it works fine, but if I leave I get a crash when I try to show the kind of warning:

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 pretty sure I'm not changing the constraints UIAlertView

, although I have a lot of constraints for the rest of the layout.

Why is a simple textbox in the UIAlertView

constraint failing?

+3


source to share





All Articles