views:

392

answers:

5

What are some uncommon or "hidden" features of Interface Builder you wish you would have known about when first learning Xcode + Interface Builder?

Edit:

Xcode specific tips here.

This question is specifically concerned with the GUI and not so obvious features of Interface Builder. And only tangentially related to Xcode.

+2  A: 

I only found the Xcode User Defaults Reference the other day. It has a good number of things not available in the preferences UI.

nall
Some examples of useful settings would be good
Casebash
+2  A: 

Interface builder has plugin architecture for custom views.

Gordon Potter
+6  A: 

You can use the mouse to measure the distance in pixels between interface elements: Select an element, like a button, then hover the mouse over another element and press option. This also works for subviews, like scrollers in a table view.

Nikolai Ruhe
+7  A: 

Sometimes it gets quite difficult to select an interface element that's buried in a deeply nested hierarchy of other elements (like a cell in a table column in a table view in a scroll view in the content view of a window).

Pressing shift while right-clicking on a view displays a nicely sorted stack of items to select.

Nikolai Ruhe
Nice tip! Very useful, thanks. That is exactly the kind of stuff I was looking for.
Gordon Potter
+4  A: 

After customizing a view or building a view hierarchy you can drag that view back to the library to save it in the current state. You give it a name and description. It will show up in a "Custom Objects" section and can be reused in other nibs.

Nikolai Ruhe
Interesting. Does this preserve bindings and outlets? That way you can just use boilerplate in xcode for each project. Another example, is it possible to create custom objects that has specific bindings and outlets to another custom object? In other words can you save sets of objects pre configured? I guess this would really involve saving custom nibs for later use, depending on the complexity of the custom object or view.
Gordon Potter