美文网首页
点击UITextField输出错误

点击UITextField输出错误

作者: Amtion | 来源:发表于2016-08-01 14:39 被阅读342次

输出详情

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:0x155688ce0 H:[_UIButtonBarStackView:0x155681ea0(<=0)]>",
"<NSLayoutConstraint:0x155684cd0 'UIView-leftMargin-guide-constraint' H:|-(15)-UILayoutGuide:0x155684bb0'UIViewLayoutMarginsGuide' (Names: '|':_UIButtonBarStackView:0x155681ea0 )>",
"<NSLayoutConstraint:0x155684d70 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x155684bb0'UIViewLayoutMarginsGuide']-(15)-|(LTR) (Names: '|':_UIButtonBarStackView:0x155681ea0 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x155684d70 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x155684bb0'UIViewLayoutMarginsGuide']-(15)-|(LTR) (Names: '|':_UIButtonBarStackView:0x155681ea0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-08-01 14:18:13.647 CZY_iPad_new[3497:1093491] 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:0x155689270 H:[_UIButtonBarStackView:0x155500400(<=0)]>",
"<NSLayoutConstraint:0x155687f40 'UIView-leftMargin-guide-constraint' H:|-(15)-UILayoutGuide:0x155687e20'UIViewLayoutMarginsGuide' (Names: '|':_UIButtonBarStackView:0x155500400 )>",
"<NSLayoutConstraint:0x155687fe0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x155687e20'UIViewLayoutMarginsGuide']-(15)-|(LTR) (Names: '|':_UIButtonBarStackView:0x155500400 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x155687fe0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x155687e20'UIViewLayoutMarginsGuide']-(15)-|(LTR) (Names: '|':_UIButtonBarStackView:0x155500400 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

如图

满满得一屏幕错误

BUG重现

从用户名输入框,再点到用户密码输入框(或者点击输入框的顺序反过来)

BUG分析

出现原因1、两个输入框类型不同(一个是密码框,一个不是)
出现原因2、键盘类型不同(一个是默认,一个是numberPad键盘类型)

相关文章

网友评论

      本文标题:点击UITextField输出错误

      本文链接:https://www.haomeiwen.com/subject/ufgxsttx.html