Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hide view in interface builder when there are multiple views

Tags:

iphone

This is probably a dumb question, but I can't seem to figure it out. In IB, if I have two UIViews, that are subviews of the main UIViewController.view that I basically show and hide depending on the user's input, is there a way to hide one of the views while working in IB. All the text/buttons are on top of each other so I can't really tell what's going on. Is there a way to just make that view and all its children hidden while I work on the other view? Thanks.

like image 778
Crystal Avatar asked Feb 09 '12 17:02

Crystal


People also ask

What is stack view?

Overview. Stack views let you leverage the power of Auto Layout, creating user interfaces that can dynamically adapt to the device's orientation, screen size, and any changes in the available space. The stack view manages the layout of all the views in its arrangedSubviews property.


2 Answers

I'd suggest temporarily dragging one of the views outside of the UIViewController.view while you do everything in IB, and then dragging it back after you're done.

like image 146
yuji Avatar answered Oct 23 '22 15:10

yuji


In case someone comes back to this question: in the newest XCode, you can open Assistant Editor with Preview and see what's happening in the Preview while working on the xib (e.g. when you hide a view).

EDIT: doesn't seem to work in XCode 8 any more.

like image 26
Kasia K. Avatar answered Oct 23 '22 16:10

Kasia K.