In Xcode Interface Builder - why are the options in the Editor--->Arrange menu (containing Send to Front, Send to Back) often disabled? - ios

What I'm trying to do is simple: bring a label in front of an image within a subview.
But all of the options for arranging are disabled/un-selectable when my label is selected. I find this happens often.
What could be the reason that I'm almost never allowed to change the z-axis of my objects in the Arrange menu? Is it a better practice to avoid this feature and set the order of views programmatically?

It can depend on how you have selected the label (similar to how the label can only be moved with the keyboard when selected in some ways).
A simple alternative is to look at the list of view in the pane on the left and to drag the views up and down to change the order.

It happens sometimes. In that situation, click the view or image you want to send back then you will see little square box at the edges of image from which you can re size your image, Just click on it once and then go to Editor > Arrange > Choose option according your need.

Related

How do I change the stacking order of objects in Xcode 6?

In my projects when I forget to add something in the Main Storyboard, I always have to redo the entire thing if I want to change the "layer order." For example, if I want to add an Image View (with full screen constraints) as the background after I've already some other elements, it will cover them. How do I change the "layer" that each element is on without deleting and remaking them? Thanks.
Click on the element you want to arrange, hit Editor > Arrange > Send to Back (or send backward depending on how you want to arrange it)

Xcode buttons/images always on top?

Is there an option for a button/image to set, that it will always be shown on top? So I have 2 buttons and want to add an image. But the image covers the two buttons and I have no idea how I could get the image in the background or the buttons in the front.
BTW: I´m fairly new to xcode and programming...
Use the xCode top menu item Editor->Arrange. There you have options to handle z index for controls.
What I did was, to have two button one for the label and one for the image and when one is clicked it propagates the message to the other and does the action depending on which one was clicked.

Adding button on top of a picture

I want my buton on top of my image. Lets say I have an image on my storyboard and I want to see my button too. Also I want to do the same thing to UIWebview...
In storyboard, you can select the thing you want to move (the button of the imageview), then editor > arrange > [direction you want].
The different directions are:
Send to front
Send to back
Send forward
Send backward
A combination of these should allow you to achieve the order you want.

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.
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.
The good news: Place your mouse on the overlapped images, press and hold shift and right click the mouse. You should see the list of objects, select your object in the back. You can resize as you wish.
The bad news: you can only use the cursor arrows if you want to move it!
Select the view from the menu on the left of interface builder.

Alignment of the TabBarControls in a TabSet

we're using smartGWT for our web application. An the main page is a tabset that shows different tabs. What I want to do is do a button to the tab set with the setTabBarControls method which then is alligned to the left instead to the right. So it would somewhat look like the current Firefox version.
Is there a possibility to change the allignment of the TabBarControls? I couldn't find any.
If you want to create something like the Firefox corner button, just use TabSet.addChild(). That will place the button at the upper left, and you can use setLeft/setTop to move it elsewhere. If you want the control to appear to the left of the tabs, set a layoutStartMargin on the TabBar to leave space for it.

Resources