Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can items be grouped in Interface Builder

Tags:

iphone

I want to be able to see if I can group certain items together in IB, however I am not sure this is possible? Any advice?

like image 808
Alex Stelea Avatar asked Dec 17 '10 18:12

Alex Stelea


People also ask

What is Interface Builder in Swift?

Interface Builder The first is an editor, where you write the Swift code that makes your application run. The second is Interface Builder, which is the part where you lay out the graphical interface of your program—the buttons, toolbars, menus, images, and text that make up how your users interact with your program.


1 Answers

If you're trying to treat a set of views like a single view, you can select the views you want to "group" and choose "Editor -> Embed In -> View". This will create a single UIView with the selected views inside. This can be very useful for treating a group of views as a single view for layout purposes. The embedded views will layout relative to the enclosing view, and the enclosing view will layout relative to its superview. This is great for moving aligned views around together.

However, keep in mind that you're actually impacting the view hierarchy by doing this. It's not just a way of grouping the views for manipulation in IB.

like image 199
James Huddleston Avatar answered Oct 13 '22 00:10

James Huddleston