简体   繁体   中英

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

2. Letter Spacing Adjustment on iOS versions prior to 6.0

I am getting warning in the .xib

Link1 suggests to change the "Project Development Target" in "File Inspector". of xib file, which is already set to 5.0 as iOS 5.0 is supported.

Link2 say to unselect the "AutoLayout" in "File Inspector". I tried that but it didn't work.

What should be done to resolve this warning and also support iOS 5?

Thanks!

How to remove the warning?

Uncheck the corresponding checkmark in the .xib file.

How to support 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;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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