Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select background views in a storyboard or xib

If I select a view with my mouse in a storyboard or xib, Xcode will select the front most view. I know that I can select the other views in the document outline, but if I want to grab a background view to move it with my mouse, the front most view gets selected again when I click in the storyboard.

I think there is a way to cycle through the views and select the ones in the back by holding down on some keys, but I can't find what it is. Does anyone know?

I'm using Xcode 4.6. I know that I can also move background views using the size inspector, but I'm looking for a way to position them with my mouse.

like image 540
Darren Avatar asked Feb 28 '13 18:02

Darren


People also ask

How do I change the background of my storyboard in Xcode?

First let us see using storyboard, Open Main. storyboard and add one view to the View Controller. On the right pane you can see the property, and from there update the background color to color you want your view to be as show below.

How to set initial view controller in storyboard?

Specifying the Initial View Controllerstoryboard and select the Tab Bar Controller Scene. On the right, select the Attribute inspector. You'll find a checkbox named Is Initial View Controller. Checking this box will identify the selected view controller as the initial entry point for the storyboard you're on.

How do you add a view to a storyboard?

Add views to your view controller To that root view, you add the custom views you need to present your interface. In storyboards, you add views by dragging them onto the view controller scene. For example, the following figure shows a view controller with an image view and button on an iPhone.

Why are storyboards great features to use in iOS development?

Storyboarding makes imagination of visual production easier. And since apps are all about visual interaction, developers too can benefit by understanding how the transitions between various screens will work.


1 Answers

One way is to use the jump bar at the top of the editor. It's the control that shows the path of objects leading to the current selection.

Another way is to press control+shift and left click (or shift right click) an item. That shows you all of the objects under the mouse in a menu, and allows you to disambiguate the one you meant to select.

like image 64
Jon Hess Avatar answered Nov 15 '22 23:11

Jon Hess