我在iOS中遇到了一些布局约束错误

时间:2015-05-26 02:18:51

标签: ios iphone autolayout

我得到一些错误日志信息,但位置不是位置代码,你能帮我指出问题的原因

下面是崩溃日志的详细信息,我找不到更多位置代码,有什么问题。

详细崩溃日志:

The layout constraints still need update after sending -updateConstraints to <_UIKeyboardLayoutAlignmentView: 0x13e6ea660; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = <CALayer: 0x17443ffe0>>.
_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.
(null)
(
    0   CoreFoundation                      0x0000000185d602f4 <redacted> + 160
    1   libobjc.A.dylib                     0x000000019758c0e4 objc_exception_throw + 60
    2   CoreFoundation                      0x0000000185d60218 <redacted> + 0
    3   UIKit                               0x000000018ae64748 <redacted> + 448
    4   UIKit                               0x000000018ae64880 <redacted> + 136
    5   CoreFoundation                      0x0000000185c40cdc CFArrayApplyFunction + 68
    6   UIKit                               0x000000018ae64620 <redacted> + 152
    7   UIKit                               0x000000018ae64880 <redacted> + 136
    8   CoreFoundation                      0x0000000185c40cdc CFArrayApplyFunction + 68
    9   UIKit                               0x000000018ae64620 <redacted> + 152
    10  UIKit                               0x000000018ae64880 <redacted> + 136
    11  UIKit                               0x000000018a89b7b4 <redacted> + 104
    12  Foundation                          0x0000000186bc1308 <redacted> + 176
    13  UIKit                               0x000000018a89b4d0 <redacted> + 212
    14  UIKit                               0x000000018a8b7e04 <redacted> + 104
    15  UIKit                               0x000000018ae64be4 <redacted> + 180
    16  UIKit                               0x000000018a7b2140 <redacted> + 588
    17  UIKit                               0x000000018ac71bd0 <redacted> + 792
    18  UIKit                               0x000000018aaa8fb0 <redacted> + 1860
    19  UIKit                               0x000000018a824240 <redacted> + 356
    20  UIKit                               0x000000018a7946ec <redacted> + 536
    21  CoreFoundation                      0x0000000185d182a4 <redacted> + 32
    22  CoreFoundation                      0x0000000185d15230 <redacted> + 360
    23  CoreFoundation                      0x0000000185d15610 <redacted> + 836
    24  CoreFoundation                      0x0000000185c412d4 CFRunLoopRunSpecific + 396
    25  GraphicsServices                    0x000000018f4576fc GSEventRunModal + 168
    26  UIKit                               0x000000018a806fac UIApplicationMain + 1488
    27  Myapp                               0x1001803b0 Myapp + 1573808
    28  libdyld.dylib                       0x0000000197c0aa08 <redacted> + 4
)

dSYM UUID: B1FB72DD-A4D0-3ABA-BF95-9FCD83749770
CPU Type: arm64
Slide Address: 0x0000000100000000
Binary Image: Myapp
Base Address: 0x00000001000f0000

1 个答案:

答案 0 :(得分:1)

如果您实施了reshape2,则需要在实施中致电updateConstraints

请参阅https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html#//apple_ref/occ/instm/UIView/updateConstraints

<强>更新

[super updateConstraints];是Apple内部键盘视图。很有可能在呈现时会出现崩溃。

请参阅此雷达(Apple错误报告)以及这些可能解决方案的答案。 该错误似乎是iOS 8.3特定的。

https://openradar.appspot.com/20615507

NSInteralInconsistencyException - UIKeyboardLayoutAlignmentView

iOS 8.3 UIAlertController crashes when trying to add a textfield