Attribute Unavailable Warning on iOS Versions Prior to 8.0

Attribute Unavailable warning on iOS versions prior to 8.0

Since I had already created the constraints, 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.

Relative to margin screenshot

Attribute Unavailable: First baseline layout attribute on iOS versions prior to 8.0

Found the issue. This new constraint was added to iOS 8.0 and isn't supported with previous versions.

To get rid of this warning and allow iOS 7 builds to work you need to:

1. Click on the warning in the side bar (this should highlight the offending constraint)

2. Change that constraint to something other than "First Baseline". "Center Y" worked well for me. 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.

Sample Image

Warning: Attribute Unavailable: Content Edge Inset in iPhone SDK for iOS versions prior to 3.0

Are the XIB files set up using a format for iOS < 3.0? There are lots of different options for the format for XIBs, and you get warnings if your interfaces use features that aren't supported by the version of a file. That's my guess.

Xcode 5 Warning: Attribute Unavailable

I'm going to go out on a limb here and suggest the problem is exactly what the error says. Your project is set to deploy on targets below iOS 6 and you have a XIB or Storyboard that uses Attributed Text, a feature that is not supported before iOS 6.

The fix is either:

  • Change your minimum supported version to iOS 6
  • Don't use Attributed text

warning: Attribute Unavailable: Tint Color

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;
}

Storyboard warning : First baseline layout attribute before iOS 8.0

I think the issue is you have many constraints that are using NSLayoutAttributeFirstBaseline and when you click on the warning Xcode is pointing to wrong constraint.

To identify the constraints search in Xcode with "firstBaseline". Change all constraints that are using NSLayoutAttributeFirstBaseline.

Sample Image

Note: You may need to adjust your views. In my case NSLayoutAttributeBaseline worked well.

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.

Layout attributes relative to the layout margin on iOS versions prior to 8.0

Disable "Prefer margin relative"

Sample Image



Related Topics



Leave a reply



Submit