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

前端 未结 7 2140
[愿得一人]
[愿得一人] 2020-12-02 12:12

What would be causing the following warning (and subsequent alignment issues on iOS 7)?

Attribute Unavailable: Layout attributes relative to the layou

7条回答
  •  抹茶落季
    2020-12-02 12:43

    None of the posted answers solved the problem for me. But the reason for this is the following: Xcode 6 creates constraints based on relative margins by default. Those are only available on iOS 8.0 and newer. You get these warnings when your deployment target is set to iOS 7.0 or lower.

    The way I fixed the warning:

    • Click the warning in Xcode
    • Attribute inspector will open the constraint
    • Search for item that has margin (see screenshot)
    • Turn off Relative to margin option

    Attribute inspector

提交回复
热议问题