can items be grouped in Interface Builder
I want to be able to see if I can group certain items together in IB, however I am not sure this is possible? 开发者_如何学JAVAAny advice?
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.
You can "group" them by views. If you want to show the items "grouped" then you can set the background of that view to clear, thats about the closest you will get to achieving that.
For example, if you have a bunch of buttons you want to group together, place all of them on 1 view, same would go for everything else you want to group together.
精彩评论