Jonny
Jonny

Reputation: 16298

"Size to Fit content" in Interface Builder only works sometimes?

"Size to Fit content" in Interface Builder only works sometimes?

How come? For two seemingly exact button, just with different images (from asset catalog), one of them can be autoresized while the other cannot; the Size to Fit content is greyed out for one of them.

Update: For the 2nd button this time, I just restarted Xcode and now it magically works... is this normal?

Upvotes: 1

Views: 626

Answers (1)

DBD
DBD

Reputation: 23233

The menu option is greyed out if an item has already been sized to fit.

If you want to test this, change the content width or height. Deselect and reselect the item (the menu only seems to update when you select an item) then check the menu item. It will no longer be greyed out.

Upvotes: 1

Related Questions