简体   繁体   English

警告:属性不可用:淡色

[英]warning: Attribute Unavailable: Tint Color

file://localhost/Users/.../mYGalleryView.xib: warning: Attribute Unavailable: Tint Color is not available on iOS versions prior to 6.0

&

/Users/.../myCell.xib:9: Letter Spacing Adjustment on iOS versions prior to 6.0

warning: Attribute Unavailable: 警告:属性不可用:

1. Tint Color is not available on iOS versions prior to 6.0 1.色调颜色在6.0之前的iOS版本上不可用

2. Letter Spacing Adjustment on iOS versions prior to 6.0 2.在6.0之前的iOS版本上的字母间距调整

I am getting warning in the .xib 我在.xib中收到警告

Link1 suggests to change the "Project Development Target" in "File Inspector". Link1建议更改“文件检查器”中的“项目开发目标”。 of xib file, which is already set to 5.0 as iOS 5.0 is supported. xib文件的版本,由于支持iOS 5.0,该文件已设置为5.0。

Link2 say to unselect the "AutoLayout" in "File Inspector". Link2说要取消选择“文件检查器”中的“自动版式”。 I tried that but it didn't work. 我尝试过,但是没有用。

What should be done to resolve this warning and also support iOS 5? 如何解决此警告并同时支持iOS 5?

Thanks! 谢谢!

How to remove the warning? 如何删除警告?

Uncheck the corresponding checkmark in the .xib file. 取消选中.xib文件中的相应对勾标记。

How to support iOS 6? 如何支持iOS 6?

You can set them using code. 您可以使用代码进行设置。 First check whether you can, if yes, set it. 首先检查是否可以设置(如果可以)。

if ([self.discountListTableView respondsToSelector:@selector(tintColor)]) {
    self.discountListTableView.tintColor = [UIColor redColor];
}
if ([self.titleLabel respondsToSelector:@selector(adjustsLetterSpacingToFitWidth)]) {
    self.titleLabel.adjustsLetterSpacingToFitWidth = YES;
}

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM