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

2

11

I'm getting the following warning in XCode 6.1.

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

I think, this is also causing my iOS 7.x builds to crash.

Lymphosarcoma answered 18/12, 2014 at 23:44 Comment(0)
L
27

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.

enter image description here

Lymphosarcoma answered 18/12, 2014 at 23:44 Comment(0)
F
2

We just ran into this exact same problem, but in our case, it didn't crash Xcode; it just drew the the view wildly out of place when run on an iOS 7 simulator. We fixed it by changing the constraint's item to plain ol' baseline.

Faculty answered 26/3, 2015 at 15:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.