views:

302

answers:

1

When designing/laying out a view in Interface Builder, sometimes it would be nice to be able to open that view in its own window, rather than along with all of its parents. Is there a way to do that?

A good example is when you have a long view with controls and labels and text fields, lets call this mycontent view, and this mycontent view is encapsulated inside a ScrollView. It would be nice to be able to open this mycontent view in a separate window, sized to the entire size of mycontent view, rather than to see it inside the smaller window that is sized to the parent views, including the ScrollView. That limits you to only seeing and being able modify, the top portion of mycontent view.

The work around right now is to make mycontent view a top-level view with no parents, and at runtime to addSubview it to the ScrollView.

Anyway to select a view/subview in Interface Builder and "open in its own window" instead of the default "open with family"?

A: 

just double click the view in the window that has the file owner and all that stuff (forgot the exact name). You might have to do some diggin' but it's there

Matt S.
Doesn't work for me. If I have a hierarchy of views, and I double-click on any of the child views, I still get the top level view open up in a window and not what I want, which is a window with just the child view, and its children.
mahboudz
well for scroll views just make the view a separate .xib then just add it into the scroll view programatically. That's the way I normally do it and it works extremely well
Matt S.