AutoLayout bug集合

iOS7 AutoLayout Bug修复

'NSInternalInconsistencyException', reason: '<NSISEngine: 0x16d5ef10>...

http://stackoverflow.com/questions/28111635/ios-aspect-ratio-constraint-breaks-on-ios7-works-on-ios8

这好像是ios7.1的bug,对浮点数计算有误,一般添加按钮比例约束的时候multiplier值都是这种格式6:10 ,这样可能系统会精确的计算小数点吧.写成0.7就好了.

 

    • 崩溃信息:
      'Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil'
    • 原因
      因为偷懒使用了reset to suggested constraints, autolayout 帮我自动加了baseline的constraints,而baseline只有iOS8以后才有,兼容iOS7就崩溃了,直接移除baseline相关的constraint即可。
    • 参考链接
      http://stackoverflow.com/questions/26024906/unable-to-create-description-in-descriptionforlayoutattribute-layoutitem-coeffi/26045383#2604538
    • 按照老外的方法,把所有可能会出现bug的xib拖到文本编辑器sublime text2中,在条件表达式中加入.*"baseline".*\n 把高亮的全部删掉,回到xib重做
    • 可能还不行,是因为调试缓存xib的问题,把程序卸载了,command + k ,command + r 重新运行一次

转载于:https://www.cnblogs.com/congliang/p/4769407.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值