gpt4 book ai didi

ios - Storyboard警告 : First baseline layout attribute before iOS 8. 0

转载 作者:可可西里 更新时间:2023-11-01 04:28:46 28 4
gpt4 key购买 nike

我不知道如何摆脱这个警告,我正在使用一个包含许多 View Controller (带有标签、文本字段和许多约束)的 Storyboard,所有这些 View Controller 都是以几乎相同的方式创建的。

enter image description here

当我点击警告时,它会突出显示 scrollView 中的 UILabel :

enter image description here

这个 scrollView 有很多带有约束的 UILabel,我尝试了所有我能找到的东西,包括:Attribute Unavailable: First baseline layout attribute on iOS versions prior to 8.0

这个警告不会导致我的应用程序崩溃,我已经在模拟器和 iPhone 4 (ios 7.1.2) 上试过了。但我担心 AppStore 的批准。

最佳答案

我认为问题在于您有许多使用 NSLayoutAttributeFirstBaseline 的约束,当您单击警告时 Xcode 指向错误的约束。

使用“firstBaseline”在 Xcode 中识别约束搜索。更改所有使用 NSLayoutAttributeFirstBaseline 的约束。

enter image description here

注意:您可能需要调整您的观点。在我的例子中,NSLayoutAttributeBaseline 运行良好。

NSLayoutAttributeFirstBaseline
The object’s baseline. For objects with more than one line of text, this is the baseline for the topmost line of text. The object’s baseline. For objects with more than one line of text, this is the baseline for the topmost line of text. Available in iOS 8.0 and later.

NSLayoutAttributeBaseline
The object’s baseline. The object’s baseline. Available in iOS 6.0 and later.

关于ios - Storyboard警告 : First baseline layout attribute before iOS 8. 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34207080/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com