Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0

前端 未结 10 1737
太阳男子
太阳男子 2020-11-28 00:21

I opened an existing iOS project with Xcode6 beta6, and Xcode lists the following warning for both Storyboard and Xib files:

Automatic Preferred Max L

10条回答
  •  暖寄归人
    2020-11-28 00:51

    To Find the problem label(s) in a large storyboard, follow my steps below.

    1. In xCode's Issue Navigator right click on the error and select "Reveal In Log". (Note: @Sam suggests below, look in xCode's report navigator. Also @Rivera notes in the comments that "As of Xcode 6.1.1, clicking on the warning will automatically open and highlight the conflicting label". I haven't tested this).

    enter image description here

    1. This will show the error with a code at the end of your storyboard file. Copy the value after .storyboard

    enter image description here

    1. Next, reveal your storyboard as source file. enter image description here

    2. Search. You should be able to tell what label it is from here quite easily by looking at the content. enter image description here

    Once you find the label the solution that worked for me was to set the "preferred width" to 0.

    enter image description here

    BTW, you can always quickly get the id of an interface item by selecting the item and looking under the identify inspector. Very handy.

    enter image description here

提交回复
热议问题