Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding cause of "Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0"

I know the reason of this warning and how to solve it: to give a preferred width to the label.

The problem is that, when I click that warning, I don't see any label/view/viewcontroller selected. The storyboard opens and that's it. There are many view controllers with many views in my storyboard. How can I find out which label is causing the problem without iterating through all the view controllers manually? When I click the warning, I expect it to take me to the view causing the warning, but it just opens the storyboard.

like image 579
Can Poyrazoğlu Avatar asked Nov 13 '14 23:11

Can Poyrazoğlu


2 Answers

Here is one way to find the specific label that is causing this warning:

  1. Right click on the warning and choose "Reveal in Log"
  2. The warning in the log will be highlighted. Copy the interface builder object ID for this label (it looks like xxx-xx-xxx).
  3. Paste this in the Find Navigator. When you click on this result it will open the interface builder with the offending label selected.
like image 192
Don Eichenseer Avatar answered Oct 08 '22 03:10

Don Eichenseer


Running XCODE 6.1, I found the easiest way to do find the error was through the Report Navigator.

  1. View -> Navigators -> Show Report Navigator or simply press ⌘-8
  2. Click on the build in the left pane.
  3. Click the details icon next to the warning.

enter image description here

  1. Find the object id in the warning description.

enter image description here

  1. Go to the file and search ⌘-f for the object id.

enter image description here

  1. Fix the issue. Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0
like image 41
Tom Howard Avatar answered Oct 08 '22 04:10

Tom Howard