Unable to simultaneously satisfy constraints.
在进行版本的迭代更新时,新功能需求需要对主页面的UI进行重新的布局,但是,报了错误,出了好多约束方面的问题:
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)
(
"<NSLayoutConstraint:0x8c67c10 V:[UIButton:0x8c67320]-(2)-| (Names: '|':UIView:0x8c65ad0 )>",
"<NSAutoresizingMaskLayoutConstraint:0x8e166b0 h=--& v=--& UIButton:0x8c67320.midY ==>",
"<NSAutoresizingMaskLayoutConstraint:0x8e166e0 h=--& v=--& V:[UIButton:0x8c67320(0)]>",
"<NSAutoresizingMaskLayoutConstraint:0x8e130d0 h=-&- v=-&- UIView:0x8c65ad0.height == PicCollectionViewCell:0x8c65a00.height>",
"<NSLayoutConstraint:0x8e13710 'UIView-Encapsulated-Layout-Height' V:[PicCollectionViewCell:0x8c65a00(100)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x8c67c10 V:[UIButton:0x8c67320]-(2)-| (Names: '|':UIView:0x8c65ad0 )>
Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
总的来说,出现这样的问题,有可能是本身的约束问题,当然也可能是忘记设置属性
self.automaticallyAdjustsScrollViewInsets = NO(也可能不需要);同时在iOS9下,我们主界面更新UI需要放到主线程中来进行操作,如果不确定,可以打印下当前的线程来确定:
dispatch_async(dispatch_get_main_queue(), ^{
//更新UI
});
如果界面涉及到js交互回调传值的情况(ios 9下),同样需要我们把回传数据等操作放到主线程来操作。
最新文章
- 一些关于HTML与CSS的总结与实际应用
- Motor XT615 开机无限卡屏重启的取证与分析
- java Integer和int的拆箱与装箱
- x-code快捷键
- uva 10129 play on words——yhx
- AI
- svn执行clean up命令时报错或被锁定的解决方法
- WCF - Windows Service Hosting
- 20151217jqueryUI--自动补全工具
- php入门微理解
- 回溯法、数独与N阶可达问题
- java中json和字符串互转及日期转换 练习
- CJOJ 1087 【NOIP2010】乌龟棋 / Luogu 1541 乌龟棋(动态规划)
- jmockit学习总结
- xBIM IFC 输出 Excel 报表
- 修改了SpringBoot的主类名称后,gradle build报错的解决办法
- P1966 火柴排队
- C++ 无锁数据结构
- jmeter的环境配置
- Java 类的生命周期
热门文章
- 【腾讯Bugly干货分享】移动客户端中高效使用SQLite
- 3D游戏中的画质与效率适配
- [Java面经] 关于面试的二三事.
- PHP 面向对象编程和设计模式 (2/5) - 静态变量、属性和方法及延迟绑定
- ASP.NET 5 WebApi 返回 HttpResponseMessage
- 通过Matrix进行二维图形仿射变换
- 【NLP】揭秘马尔可夫模型神秘面纱系列文章(二)
- Linux平台 Oracle 11gR2 RAC安装Part3:DB安装
- windows环境tomcat8配置Solr5.5.1
- 代码的坏味道(10)——发散式变化(Divergent Change)