[英]Attribute Unavailable: First baseline layout attribute on iOS versions prior to 8.0
I'm getting the following warning in XCode 6.1 . 我在XCode 6.1中收到以下警告 。
Attribute Unavailable: First baseline layout attribute on iOS versions prior to 8.0 属性不可用:8.0之前的iOS版本的第一个基线布局属性
I think, this is also causing my iOS 7.x builds to crash . 我想,这也导致我的iOS 7.x版本崩溃 。
Found the issue. 发现了这个问题。 This new constraint was added to iOS 8.0 and isn't supported with previous versions. 此新约束已添加到iOS 8.0,以前的版本不支持。
To get rid of this warning and allow iOS 7 builds to work you need to: 要摆脱此警告并允许iOS 7版本工作,您需要:
1. Click on the warning in the side bar (this should highlight the offending constraint) 1.单击侧栏中的警告(这应突出显示有问题的约束)
2. Change that constraint to something other than "First Baseline". 2.将该约束更改为“First Baseline”以外的其他约束。 "Center Y" worked well for me. “Y中心”对我很有用。 You'll have to play with the options and can see the changes live to see which alternative works for you. 您必须使用这些选项并可以查看更改,以查看哪种替代方案适合您。
iOS 7 now builds again and warning is gone. iOS 7现在再次构建,警告消失了。
We just ran into this exact same problem, but in our case, it didn't crash Xcode; 我们遇到了这个完全相同的问题,但在我们的例子中,它没有崩溃Xcode; it just drew the the view wildly out of place when run on an iOS 7 simulator. 它只是在iOS 7模拟器上运行时将视图粗略地绘制出来。 We fixed it by changing the constraint's item to plain ol' baseline
. 我们通过将约束项改为普通ol' baseline
来修复它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.