Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8 attribute "hidden" does not hide view in Interface Builder

seems like Apple change how Interface Builder behaves in Xcode 8? Because when I check hidden in Attributes Inspector on a view in Interface Builder, that view is still visible.

This makes it very tedious to work with views where some views needs to be the view with the highest "z value", the front most view that is.

Is there some other way to show the green view in this example, than to change the order of them to the right (i.e. change their "z value")

In the image below hidden is checked, but I still don't see the green view below. You can download this trivial project at github

When the project is run, the green view is indeed shown, but the issues is that it is annoying when working in Interface Builder.

enter image description here

Am I missing something?

like image 900
Sajjon Avatar asked Sep 20 '16 14:09

Sajjon


3 Answers

I have the same opinion on it and I also believe that it's annoying. I with they gave you the choice to update the actual storyboard before runtime or not but they didn't so for now we have to deal with it.

There is a quick alternative option though. Hidden will not update in the storyboard but alpha will. If you change the alpha it will update in the storyboard so if you want to see the view behind it just change alpha to 0. You can always change it back easily or if your doing it in code, instead of unhiding your view just change the code so the alpha is set to 1.

like image 166
msweet168 Avatar answered Nov 08 '22 08:11

msweet168


How about unchecking the installed checkbox of the red view? This has also the flaw that you have to remember to reinstall it, but you don't have to change the z-order of your views.

like image 32
Paul Schröder Avatar answered Nov 08 '22 07:11

Paul Schröder


This is deliberate. We wouldn't want a view to be hidden from you, the editor, just because it will be hidden when the app runs. You can easily select a covered view, such as the green view, using Shift-Control-Click on the red view (or use the document outline at the left of your screen shot).

like image 1
matt Avatar answered Nov 08 '22 07:11

matt