简体   繁体   English

禁止在8.0之前的iOS版本上使用“自动首选最大布局宽度”警告

[英]Inhibit `Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0` warnings

I have an abundant amount of Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0 warnings in my project in ~80 xib files. 我的项目中有80个xib文件,其中有大量的“ Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0警告Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0 I have attempted to fix these warnings using answers found here: Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0 , but this led to AutoLayout issues. 我试图使用此处找到的答案来修复这些警告: 8.0之前的iOS版本上不提供“自动首选最大布局宽度” ,但这导致了“自动布局”问题。 Fixing all the consequential effects is not something our team wants to take on, and furthermore QA. 修复所有结果性影响并不是我们团队想要承担的,而且质量保证。 I know how to turn off all warnings for xib files in a target. 我知道如何关闭目标中xib文件的所有警告。 How do I ignore this specific warning? 如何忽略此特定警告?

在项目中找到所有多行UILabel(在Attributes Inspector中,Lines = 0),然后在Size Inspector中将其Preferred Width属性设置为0(选中Explicit复选框)。

Check the label constrain, the answer was to click on the constraint, and then look in the Utilities bar (on the right). 检查标签约束,答案是单击约束,然后在“实用程序”栏中查看(在右侧)。 As shown in the picture below, click on an item and then make sure that "relative to margin" is unchecked. 如下图所示,单击一个项目,然后确保未选中“相对于边距”。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 自动首选最大布局宽度在8.0之前的iOS版本上不可用 - Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0 Xcode 7中ios 8.0之前的自动首选最大布局宽度 - automatic preferred max layout width before ios 8.0 in Xcode 7 相对于8.0之前的iOS版本上的布局边距的布局属性 - Layout attributes relative to the layout margin on iOS versions prior to 8.0 属性不可用:8.0之前的iOS版本的第一个基线布局属性 - Attribute Unavailable: First baseline layout attribute on iOS versions prior to 8.0 8.0之前的iOS版本上的属性不可用警告 - Attribute Unavailable warning on iOS versions prior to 8.0 UIstoryboard:模态选择的“动画”选项在6.0之前的iOS版本上不可用 - UIstoryboard: Animates option for Modal segues is not available on iOS versions prior to 6.0 类不可用。 在6.0之前的iOS版本上无法使用取消同步功能 - Class Unavailable. Unwind segues are not available on iOS versions prior to 6.0 将应用程序升级到iOS 7 - 错误“iOS版本6.0之前的自动布局”(但希望iOS 7不旧) - Upgraded app to iOS 7 - error “Auto Layout on iOS Versions prior to 6.0” (but want iOS 7 not older) iOS版本6.0之前的UICollectionView - UICollectionView on iOS versions prior to 6.0 在iOS 8.0和更高版本中可用-为iOS 7构建 - Available in iOS 8.0 and later - build for iOS 7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM