- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我遇到了一个问题,我有一个忘记密码选项,我在其中放置了一个带有输入字段的 UIAlertView。
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Forgot Password?"
message:@"Please enter your username to retrieve password"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Ok", nil];
[alertView setAlertViewStyle:UIAlertViewStylePlainTextInput];
[alertView show];
当应用程序启动时,它工作正常,但是当我登录、执行各种操作、注销并按“忘记密码”时,我收到此错误并且我的应用程序崩溃了:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The layout constraints still need update after sending -updateConstraints to <_UIKeyboardLayoutAlignmentView: 0x7ffef5b37b00; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = >. _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.'
完整日志如下:
*** First throw call stack:
(
0 CoreFoundation 0x000000010e850c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010e4e9bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010e850b9d +[NSException raise:format:] + 205
3 UIKit 0x000000010f2c5427 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 467
4 UIKit 0x000000010f2c553e -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 124
5 CoreFoundation 0x000000010e757354 CFArrayApplyFunction + 68
6 UIKit 0x000000010f2c52ed -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 153
7 UIKit 0x000000010f2c553e -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 124
8 CoreFoundation 0x000000010e757354 CFArrayApplyFunction + 68
9 UIKit 0x000000010f2c52ed -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 153
10 UIKit 0x000000010f2c553e -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 124
11 UIKit 0x000000010f2c5a0e __60-[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded]_block_invoke + 96
12 Foundation 0x000000010e0891be -[NSISEngine withBehaviors:performModifications:] + 155
13 UIKit 0x000000010f2c56d6 -[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded] + 231
14 UIKit 0x000000010f2b8ebe -[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] + 91
15 UIKit 0x000000010f2c5dde -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeeded] + 146
16 UIKit 0x000000010ecbd56a -[UIView(Hierarchy) layoutBelowIfNeeded] + 340
17 UIKit 0x000000010f05245e -[_UIAlertControllerAnimatedTransitioning animateTransition:] + 672
18 UIKit 0x000000010ed57a4e __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 1867
19 UIKit 0x000000010ec6d62c _applyBlockToCFArrayCopiedToStack + 314
20 UIKit 0x000000010ec6d4a6 _afterCACommitHandler + 533
21 CoreFoundation 0x000000010e783ca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
22 CoreFoundation 0x000000010e783c00 __CFRunLoopDoObservers + 368
23 CoreFoundation 0x000000010e779a33 __CFRunLoopRun + 1123
24 CoreFoundation 0x000000010e779366 CFRunLoopRunSpecific + 470
25 GraphicsServices 0x00000001126c9a3e GSEventRunModal + 161
26 UIKit 0x000000010ec49900 UIApplicationMain + 1282
27 Univet 0x000000010d83150f main + 111
28 libdyld.dylib 0x000000011017a145 start + 1
29 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
我正在使用 IQKeyboardManager用于文本字段之间的导航。
请指导,您的指导将不胜感激。
提前谢谢你。
最佳答案
经过简单的谷歌搜索后,我找到了 the answer针对您的问题。
On iOS 8.3 if you the keyboard is being displayed and then you try to display a UIAlertView or UIAlertController that has an input field you will get this crash.
关于ios - NSInternalInconsistencyException?发送后布局约束仍需要更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30614009/
我的 iOS 应用程序出现奇怪的错误。从昨天开始一切都运行良好,今天我对一个与 AppDelegate 无关的 View Controller 做了一些改进,当我试图测试我在模拟器上所做的更改时,我得
所以,我正在尝试一下 iOS 编程。时间不多,但我已经推迟学习太久了。但我被这个奇怪的问题困扰了两天。当我尝试将单元格添加到我的 collectionView 时,出现以下错误。 'NSInterna
我的应用程序发生了奇怪的崩溃(仅限 iPad 的 9.x),我不确定如何调试它,因为日志无助于发现正在发生的事情。 最奇怪的是日志显示Auto layout internal error ,但我的应用
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid updat
我想在 swift 中创建一个弹出窗口,并在用户单击按钮时显示它。我不使用 Storyboard , View 是通过编程创建的。 class CreateNoticePopupViewControl
我在仅限 iOS 12 的 crashlytics 上遇到此崩溃。 有人知道这是什么吗?看起来与推送通知相关,但我们的应用中还没有。 致命异常:NSInternalInconsistencyExcep
我已经阅读了有关此错误的所有内容,但仍然无法确定为什么它会在我的应用程序中发生。 使用后台上下文保存多个 Core Data 对象时出现以下错误: *** 由于未捕获的异常“NSInternalInc
我正在尝试从 UITableView 中删除行 -(void) closePickerViewRow:(id) sender { if(self.pickerIsShown && [self.
我在 IOS 上使用 PhoneGap 2.9.0 并为 iPhone5 构建应用程序。 我正在尝试更改启动画面,我遵循了 phonegap 解释 我的行动: 1. 在 iPhone project
对,我有 5 次观看。其中一个 View 称为 RecordViewController。 (RecordViewController 导致错误)我可以很好地切换 View 。但是一旦我进入记录 Vi
在搜索解决方案后我无法解决这个问题,我有这段代码来列出核心数据中的数据: import UIKit import CoreData class ViewControllerClass: UITable
我遇到了一个问题,我有一个忘记密码选项,我在其中放置了一个带有输入字段的 UIAlertView。 UIAlertView *alertView = [[UIAlertView alloc] init
我想用 Objective-C 做一个带有表搜索的 iOS 应用程序。我试过这个项目: https://github.com/versluis/Table-Search-2015 现在我尝试在导航 V
我在 View Controller 之间切换时遇到问题。 我的 md360AppDelegate.h header 如下所示 #import @class md360ViewController;
更新方法: override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingS
每当我尝试使用 AVPlayer 从 url 流式传输歌曲时,我都会收到 NSInternalInconsistencyException 错误。我在结构上制作了一个全局流播放器,以便我的流播放器可以
我正在尝试向我的应用添加容器 View 。但是,它不断崩溃并出现以下错误: 'NSInternalInconsistencyException',原因:'containerView 是必需的。' 我做
尝试保留(更新)标识对象 (persistIdentity:error:) 时版本不匹配失败。对象版本=1229,持久版本=1230。 #10. Crashed: com.twitter.crashl
更新:看来我设法识别了单元格,所以原来的问题解决了。但是现在,截断相同的代码后,出现以下错误: 2012-10-31 15:21:41.857 Laktase[22658:11603] -[NSMan
我有这段代码试图在后台获取 HealthKit 数据。当我第一次运行该应用程序时,代码运行良好,但如果我手动执行后台提取(使用调试命令),我会抛出一个异常并显示一个错误,内容为 reason: 'th
我是一名优秀的程序员,十分优秀!