美文网首页
iOS布局约束常见打印问题

iOS布局约束常见打印问题

作者: 762683ff5d3d | 来源:发表于2018-03-02 15:56 被阅读0次

自动布局常见约束错误打印:

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)


一般就两个原因:

1,你的约束的确设置错误;

2,忘记设置控件的:setTranslatesAutoresizingMaskIntoConstraints 等于NO 。

相关文章

网友评论

      本文标题:iOS布局约束常见打印问题

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