iOS Constraint错误

来源:互联网 发布:淘宝海景房 编辑:程序博客网 时间:2024/05/22 18:55

调试的时候出现一下错误,是因为UIView在View的constraint太多了,一般只要距离左边 距离上面 宽 高即可,如果还有距离右边 距离下面,就要删掉就行了,可以参考

http://www.raywenderlich.com/zh-hans/23026/ios-6-%E8%87%AA%E5%8A%A8%E5%B8%83%E5%B1%80-%E5%85%A5%E9%97%A8%EF%BC%8D2


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