Arc676
Arc676

Reputation: 4465

View is Clipping its Content error

I'm using Xcode 4.6. In a window I keep getting this "view is clipping its content" error and when I click on it, the XIB editor highlights a label. What is this error trying to tell me and how to I fix it?

Upvotes: 4

Views: 6112

Answers (3)

kirkgcm
kirkgcm

Reputation: 47

First, clicking on the text "View is clipping..." will select the control that has the issue. it happens when you resize a text field too small for the inner text field cell to fit in. enlarging the control makes warning disappear. you can also select the inner cell and go to size inspector to see if there are options to make it smaller to match your desired overall size.

Upvotes: 5

Brad Werth
Brad Werth

Reputation: 371

You have a carriage return / newline at the end of the text in your label. That empty line is part of the "content" which is larger than the "view". Get rid of your extra newline and you'll take care of this.

Upvotes: 1

Mikael
Mikael

Reputation: 3612

It's telling you that your constraints hasn't been set up correctly. You can resolve the by clicking on the view in question, then clicking on the small icon at the bottom and choose: "Reset to suggested constraints"

enter image description here

Or you could click on the little small orange (or red) arrow in your Document Outline (the list to the left of your view that shows all views), then click on Resolve Issue

Upvotes: -1

Related Questions