Swift iOS Simulator键盘约束问题

时间:2018-09-04 13:50:50

标签: ios constraints ios-simulator

使用硬件键盘时出现问题(未选中“切换软件键盘”)。当我从一个文本字段切换到另一个文本字段时,出现以下约束问题:

[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 )>

我正在尝试使用此指南调试约束: How to trap on UIViewAlertForUnsatisfiableConstraints?,但未从窗口层次结构中的错误中找到地址。

0 个答案:

没有答案