使用UIAlertViewStyleSecureTextInput时应用程序崩溃

时间:2015-05-19 11:26:51

标签: ios constraints uialertview uikeyboard

我有一个非常基本的警报视图

<button>Normal Button</button>

<button class='imgButton'>Image Button</button>

如果我评论设置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]; 它可以正常工作,但是如果我离开时我在尝试显示警报视图时遇到了崩溃:

UIAlertViewStyleSecureTextInput

我很肯定我没有修改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.' 的约束,尽管我对布局的其余部分有很多限制。

为什么简单地在UIAlertView上设置文本字段会导致约束崩溃?

0 个答案:

没有答案