ilyon
ilyon

Reputation: 233

I get some layout constraints error in iOS

I get some error log info,But the position is not the position code, can you help me to point out the cause of the problem

Below is the details of the crash log, I can't find more position the code, what's the problem.

detail crash log:

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

Upvotes: 0

Views: 371

Answers (1)

stevekohls
stevekohls

Reputation: 2255

If you implemented updateConstraints you need to call [super updateConstraints]; within your implementation.

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

UPDATE:

_UIKeyboardLayoutAlignmentView is an Apple internal keyboard view. Most likely something is crashing while it is presented.

See this Radar (Apple bug report) and these answers for a potential solution. The bug seems to be iOS 8.3 specific.

https://openradar.appspot.com/20615507

NSInteralInconsistencyException - UIKeyboardLayoutAlignmentView

iOS 8.3 UIAlertController crashes when trying to add a textfield

Upvotes: 1

Related Questions