Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding some views in the interface builder

Is there a possible way to hide some views in Interface Builder? I don't mean to hide it when the app launches, but to hide it just in Interface Builder to be easy for me to see other views. Actually I want to do that because my xib file has a lot of views and it is hard to see !

like image 874
user3516596 Avatar asked May 05 '14 17:05

user3516596


People also ask

How to hide a view in Swift ui?

Use an opacity(_:) modifier with a value of 0 so that the layout accounts for the error message whether or not it's visible. You can also use this strategy for removing a view that doesn't affect other views' placement, like a view inside an overlay(alignment:content:) modifier.

How do you hide your view on storyboard?

Select one of your views to 'hide' and in Utilities Pane, select Size inspector and set your X (horizontal) value to 1000 - which will slide the view off the screen, allowing you access to layers below.

How to disable Minimap xcode?

Navigate to Adjust Editor Options (at the top right corner, to the left of the Add Editor Below button) and uncheck Minimap (or press ^⇧⌘M ).


2 Answers

Admdrew,

Unfortunately there is no way you can do that in storyboard. The only thing you can do to view the Views which is overlapped by others, is drag it to the top.

For example, I drag PickerView to the red line to make it to the top, then edit PickerView, and drag it back to the previous position when finish: https://www.dropbox.com/s/e18nmr9mya9y0s8/DizSfOW_3F3a_wV4YVXgFk__h0PoFWbd3rs1HbcTN-4.png

I prefer to use many View Controllers, it's better for your performance. But I must say that in some cases, you still have to use many UIView place on top of others, and I think this is the best way to edit each View.

Cheers,

UPDATE AUGUST 17, 2015

Since XCODE 6.x already added in the feature called "Installed" in the right panel, so now you can easily disable the upper view for temporary by uncheck "Installed", then do-whatever-you-are-planning-to-do with the lower view. Just remember to return it to be checked after you finish.

Step by step following this: 1. Click to select the upper view. 2. On the right panel, look for "Installed". 3. Click to uncheck it. That's it!

It's at the bottom of this picture

Cheers!

like image 119
Goon Nguyen Avatar answered Sep 18 '22 17:09

Goon Nguyen


You'd use the Hidden property in the Attributes Inspector. But I'm not sure is this is what you'd like to achieve.
By doing that you'd need to set the attribute to Hidden = NO before running your app.

Hidding Views IB

I think that using groups of views could be also a better way to handle lot of views in the same xib files. You could do that Editor -> Embed In -> View. Selecting all related views and making groups could help you to work with them easily by hiding or moving some groups.

like image 44
Barbara R Avatar answered Sep 19 '22 17:09

Barbara R