Oneiros
Oneiros

Reputation: 4378

Xcode stupid warning: View is clipping its content


I get this stupid warning in Xcode 4

Clipped Content
View is clipping its content

if I create an unbordered bevel button with an image bigger then the button itself.
Why? How can i suppress it?

Upvotes: 25

Views: 14665

Answers (6)

neowinston
neowinston

Reputation: 7764

For Xcode 10.2.1 what solved my problem was to choose Position Below, on Interface Builder, as shown in these pictures, under Show the Attributes inspector tab:

enter image description here

enter image description here

Upvotes: 0

hailuodev
hailuodev

Reputation: 772

I had a similar problem with a gray warning.

"Warning: Clipped Content. View is clipping its content in XXXX.xib"

I got rid of the warning by right clicking on XXXX.xib > Open As > Source Code.

After building again in xcode the warning was gone.

Upvotes: 52

Solid Soft
Solid Soft

Reputation: 1932

enter image description here

Change scaling according to your requirement. It will solve it.

Upvotes: 15

user767644
user767644

Reputation: 31

Had the same problem. Nothing helps, but add the complaining NSButton again, same wires and bindings and image in same size (scaling down), problem was gone.

Upvotes: 1

Erik
Erik

Reputation: 2148

I had the same problem and I finally ended up resizing the image because it was so annoying.

Upvotes: 2

Mike K
Mike K

Reputation: 2227

as far as i know you can't suppress specific xib notices, but you can disable them in general. in project->settings (or target->settings if you have multiple targets and only want to do it for one/some), there is the "Interface Builder XIB Compiler - Options" section which includes "Show Notices". if you set this to No then you should stop seeing this message. of course, it may mean you miss out on other messages.

Upvotes: 2

Related Questions