Make Xcode 5 find all non-local views

I just switched the project using the storyboard from Xcode 4 to Xcode 5 and received a whole bunch of warnings about invalid viewing. However, Xcode seems a little shy about showing them to me. When I look through the storyboard and select things, Xcode adds these warnings to the Problem Navigator - and then, if I don’t quickly jump on them, it deletes them again without me, actually changing anything. I did not even understand what actions cause the appearance and disappearance of warnings. This is very annoying - at one point there were about 20 warnings that quickly disappeared before I could address them.

I want to track all these problems and solve them, but I don’t know how to do it. What causes Xcode to add and remove these warnings in Problem Navigator, and how can I track them all when Xcode hides them from me?

+6
source share
2 answers

I will take a picture before you do this:

  • Click on your XIB file
  • Expand Dock
  • Look at the right edge of the dock and you will see yellow round icons.
  • Click on the circle, it will change to a triangle
  • Click on the triangle

You should see some radio buttons allowing you to update restrictions and a check box to apply changes worldwide.

Click “Fix Misplacement” and you should return to “No Problem”.

+7
source

Reset to Suggested Constraints sometimes does not get rid of this warning. The solution is to select the Placeholder in the Intrinsic Size drop-down menu in the Size inspector question. Then add the missing constraints as needed.

(taken from here: Xcode 5 layout errors - Misplaced View Frame for the label will be different at runtime )

0
source

Source: https://habr.com/ru/post/954188/


All Articles