1
votes

When I do something simple, like add a Wrapping Text Field in Interface builder (drag and drop method), I find that I'm unable to size the object as I would like using the mouse pointer.

For example, once I've placed this Wrapping Text Field into the upper left hand corner of my Document, I can't adjust the height of the object by dragging down on the bottom-middle sizing tool.

This happens all the time when sizing different objects in Interface Builder, it's really frustrating! The only workaround seems to be to open the Size Inspector and to manually adjust the height of the object by increasing the value.

What am I doing wrong? Is it because the object clamps to the top-left corner of the Document when I place it there? I'm not adding any constraints, merely dragging and dropping elements onto the Document in the xib.

I'm using Xcode Version 5.1.1 (5B1008) on OS X 10.9.2 (13C1021)

1
Many UI Elements have a fixed height, maybe that is causing that. - Volker
Yes it seems so, I've posted my answer now after a bit of playing around. It seems the "Use Auto Layout" feature was preventing me changing the height of the NSTextField with the mouse pointer. I'm not sure where I can see that the NSTextField has this fixed height property though, is it in the settings somewhere? - Simon Bosley

1 Answers

0
votes

OK so after a bit of playing around in Interface Builder, I've noticed that I can switch off the "Use Auto Layout" feature in the File Inspector. Now when I switch to the Sizing Inspector I have an easy to use "Auto Sizing" feature that when I hover over the preview, shows me exactly how the NSTextField will size when re-sizing the parent document.

Also once I've switched off "Use Auto Layout", I can use the mouse pointer to adjust the NSTextField height and width in the Interface Builder.

I guess the "Use Auto Layout" is constraining the height of the NSTextField to the appropriate height it thinks it should be but I can't tell where it get's this value from.