Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undoing stack view from storyboard

Xcode 7's interface builder allows stackview to be easily created around subviews via the click of the "Stack" button. However, there seems no way to "unstack" the subviews from a stackview. Is there a way to do this in interface builder?

like image 220
Boon Avatar asked Dec 20 '15 11:12

Boon


People also ask

How do I delete a stack view?

In order to delete a Stack View, two methods: (A) (1) open the navigator then the outline view; (2) select the Stack View that we want to delete/remove (see select the Stack View); (3) In the top Xcode tool banner click Editor then Unembed.

How do you stack view in Storyboard?

The exact layout varies depending on the stack view's axis , distribution , alignment , spacing , and other properties. To use a stack view, open the Storyboard you wish to edit. Drag either a Horizontal Stack View or a Vertical Stack View out from the Object library, and position the stack view where desired.

How do I hide view in stack view?

In order to hide a view within a stack view, set the contained view's hidden property to true , and the stack view handles the rest. This is how you'll fix the spacing under the WEATHER label when the user hides the text below it.

How do I delete a view in stackView?

To prevent the view from appearing on screen after calling the stack's removeArrangedSubview: method, explicitly remove the view from the subviews array by calling the view's removeFromSuperview() method, or set the view's isHidden property to true.


2 Answers

Select the stackview you want to break then click Editor -> Unembed

like image 73
IamMashed Avatar answered Oct 07 '22 03:10

IamMashed


Subviews in the stack are children of the stack. In the "Document outline" just select the subviews and drag them out of the stack view. Then you can delete the stackview.

like image 43
user3126427 Avatar answered Oct 07 '22 03:10

user3126427