How to access obscured objects in Xcode - xcode

In Xcode storyboard, is there any way to move with mouse the view for example, obscured by another view?

Select it in the document navigator to the left. Double-click and you can use the arrow keys to nudge the position around.

Related

Xcode 6 moving views instead of rotating in Debug View Hierarchy

Is there possible to move the views instead of rotating them when dragging around in the Debug View Hierarchy pane? It zooms in the center by default but I want to see some details of a view in the bottom part of the screen.
I don't know how could I not figured this out sooner. Using a Magic Mouse, simply swipe on it (scroll) horizontally or vertically to move the entire View Hierarchy.

XCode: Moving UI-elements in storyboard editor

Is it possible to lock or freeze elements in storyboard editor so that they are ignored, when clicking and dragging?
My problem is that I have several elements underneath two big UIViews that cover the whole window. So in order to for example move a button underneath them I first have to move the big views out of the way, move the button, then move them back.
Is there a better way?
When I select the element in the tree-view on the left, it gets deselected as soon as I click on the storyboard. Perhaps there's a keyboard shortcut to keep the selection while dragging?
There isn't I'm afraid, at least not that I've ever been aware of.
You can use the object navigator / tree-view on the left to select your items, then you can move objects around using the x/y/w/h properties on the size inspector.
Another solution could be to set the items you don't want to drag around to hidden while you're dragging other elements around.

Xcode Lock an object when maximizing the window

I'm looking for the following:
I have an object in the .nib file a (box). Whatever happens to the window, resizing, maximizing,... I want the box to be at the same place and have the same width and height at all costs.
How is this possible?
thx!
Since xCode 4.3 I think, objects use auto layout. To disable this, go to the first tab in the inspector. Then uncheck "use autoLayout". Then just go to the layout tab and in the "autorizing" box chek the arrows going from left to right and up to down! Here are some images:
1.
2.

SplitView not resizing NSTableView in subview correctly

I have a 10.6 app that I am building on Lion with Xcode 4.3
There is a horizontal split view in the main view, containing the following:
The top view contains an NSSearchField with an NSTableView below it.
The bottom view contains a WebView.
I have it working, but when I resize the split view the top view behaves oddly.
What I want to happen is for the search field to remain where it is, the tableview to remain where it is, but to expand if the split view is dragged down. If dragged up, I want the webview to overwrite the search field and table view.
You can see what I mean in this clip: http://dl.dropbox.com/u/160638/Work/TENSOFT/resizemostlyokay.mov
This keeps the things in the right place when I drag up, but doesn't expand the table when I drag down. The view is expanded, but not the table.
So, I changed the autosizing constraint on the table view / scroll view to make it expand when the view is resized. This is what happens: http://dl.dropbox.com/u/160638/Work/TENSOFT/resizeproblem.mov
When the split bar is moved upwards the table view is moved upwards inside the top view until it overwrites the search field. It doesn't move back when the bar is moved back down.
I cannot find a way to make this work by changing the autosizing constraints. This is usually pretty easy stuff, so either I'm missing something obvious or...?
Has anyone seen this behaviour before when creating SL apps on Lion with Xcode 4.3?
FYI, if I replicate this in a new 10.7 project using auto-layout everything works fine.
Regards
Darren.
When you allow an NSSplitView to make one of its subviews very small so that the subviews effectively overlap you get layout issues and this is one of the reasons that Apple introduced auto-layout (watch the WWDC video about auto-layout and I think they demo this problem near the beginning).
If I were you I'd set a minimum size for the top pane so that, for example, it stops resizing when it is 100px high. You can then allow it to collapse so that the user can still show just the WebView.

How to assign different z-order to my Interface Builder objects?

How can I change the z-value, or just send to back or to front the objects in Interface Builder?
i.e. I would like to move to front the "Label" in this View:
You need to reorder then in Interface Builder. It seems like you're using Xcode 4. So, first, click on the arrow in the bottom left corner of IB to expand the side panel:
Next, click and drag the views that you'd like to rearrange.
The lower an item is on the list from the top of the list, the higher its "z-index".
with that object selected, goto (menu) Editor>Arrangement> . There will be 4 options with activated appropriate options.
xCode 10.3 (2019):
I had the same problem when copying/pasting a background image view. I couldn't drag it to change its z-order in the Document Outline panel (in Interface Builder).
The answer was just to restart xCode.
I think that re-indexed/re-built the storyboard and I could drag it higher in the list (thus making it lower in the z-order + behind the other controls).

Resources