У меня проблема при использовании аппаратной клавиатуры (Toggle Software Keyboard снята). Когда я переключаюсь с одного текстового поля на другое, я получаю следующую проблему ограничения:
[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.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x60c00069b0d0 h=--& v=--& UIKeyboardAssistantBar:0x7fcd70e8dd80.height == 0 (active)>",
"<NSLayoutConstraint:0x604000687ee0 V:|-(0)-[_UIButtonBarStackView:0x7fcd70eb6120] (active, names: '|':UIKeyboardAssistantBar:0x7fcd70e8dd80 )>",
"<NSLayoutConstraint:0x604000687f80 V:[_UIButtonBarStackView:0x7fcd70eb6120]-(0)-| (active, names: '|':UIKeyboardAssistantBar:0x7fcd70e8dd80 )>",
"<NSLayoutConstraint:0x6000004958b0 'UIButtonBar.maximumAlignmentSize' _UIButtonBarButton:0x7fcd7404ad40.height == UILayoutGuide:0x6040007b4d60'UIViewLayoutMarginsGuide'.height (active)>",
"<NSLayoutConstraint:0x604000490900 'UIView-bottomMargin-guide-constraint' V:[UILayoutGuide:0x6040007b4d60'UIViewLayoutMarginsGuide']-(9)-| (active, names: '|':_UIButtonBarStackView:0x7fcd70eb6120 )>",
"<NSLayoutConstraint:0x60400028b180 'UIView-topMargin-guide-constraint' V:|-(10)-[UILayoutGuide:0x6040007b4d60'UIViewLayoutMarginsGuide'] (active, names: '|':_UIButtonBarStackView:0x7fcd70eb6120 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x604000490900 'UIView-bottomMargin-guide-constraint' V:[UILayoutGuide:0x6040007b4d60'UIViewLayoutMarginsGuide']-(9)-| (active, names: '|':_UIButtonBarStackView:0x7fcd70eb6120 )>
Я пытался отладить ограничения, используя это руководство:
Как перехватить UIViewAlertForUnsatisfiableConstraints? , но не удалось найти адреса из-за ошибки в иерархии окон.