0

I am getting this error for each view with constraints:

Misplaced View Frame for "Label - Label" will be different at run time.

I am aware that this question has been already asked a lot of times:

Question 1

Question 2

All solutions suggest to resize the View (Label) or update the frames so it will be resized automatically. That's working for me also BUT after restarting the Xcode, the views are resized back to the previous and I am getting a lot of Warnings.

Any ideas for a permanent solution??

Please note that I can compile my project and constraints are working fine but since I have about 120 warnings for the labels I am sure that I will miss some important warnings in the future.

Update with Screenshots:

enter image description here enter image description here

Community
  • 1
  • 1
BlackM
  • 3,927
  • 8
  • 39
  • 69

2 Answers2

0

Your error here is involved with your storyboard not matching the numbers specified in your constraints. I'm not exactly sure what your question is, but there are three ways to actually remove this error.

1. Manually resize the label to fit the orange dotted lines.

2. Change the numbers of the constraints so that the dotted lines fit the location of the label

Or 3, Get XCode to automatically adjust the label for you. This can be done by selecting the orange button, and fixing the misplacement as seen here.

You can also select the optional "Select all views in container" to fix this for all labels you have.

Graytr
  • 104
  • 8
  • I can make the error get away but as soon as I restart the Xcode it's back – BlackM Jun 06 '16 at 14:44
  • Unless you're not saving, how can the error come back? That would mean that the label is no longer in the same spot as when you left XCode? – Graytr Jun 07 '16 at 19:04
0

select label, after this press the triangle between two vertical (bottom-right in picture) lines and select update frames...enter image description here