본문 바로가기

iOS 프로그래밍/오류

[iOS] Unable to simultaneously satisfy constraints.(assistantView) error

assistantView error in console

If autolayout is perfect and you get this error

[LayoutConstraints] Unable to simultaneously satisfy constraints.

    Probably at least one of the constraints in the following list is one you don't want. 

    Try this: 

        (1) look at each constraint and try to figure out which you don't expect; 

        (2) find the code that added the unwanted constraint or constraints and fix it. 

(

    "<NSLayoutConstraint:0x600001312e40 'assistantHeight' TUISystemInputAssistantView:0x7fd96d81ebb0.height == 44   (active)>",

    "<NSLayoutConstraint:0x600001322d00 'assistantView.bottom' TUISystemInputAssistantView:0x7fd96d81ebb0.bottom == _UIKBCompatInputView:0x7fd96be26810.top   (active)>",

    "<NSLayoutConstraint:0x600001322df0 'assistantView.top' V:|-(0)-[TUISystemInputAssistantView:0x7fd96d81ebb0]   (active, names: '|':UIInputSetHostView:0x7fd96bc67770 )>",

    "<NSLayoutConstraint:0x600001311e50 'inputView.top' V:|-(0)-[_UIKBCompatInputView:0x7fd96be26810]   (active, names: '|':UIInputSetHostView:0x7fd96bc67770 )>"

)



Will attempt to recover by breaking constraint 

<NSLayoutConstraint:0x600001322d00 'assistantView.bottom' TUISystemInputAssistantView:0x7fd96d81ebb0.bottom == _UIKBCompatInputView:0x7fd96be26810.top   (active)>



Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

change like this

 

I think this is an iOS bug issue.