Xcode preview changing even after pinning it - xcode

I have the Canvas preview open and auto-refreshing the view that I am working on.
When I click on the pin in the bottom left corner, it fills with blue, giving me the impression that it's been pinned. But, when I navigate to a different view, that view is then previewed and the pin in the bottom left is still highlighted blue.
I'm currently worthing within Xcode 11.5.

I've experienced the same issue on the, as of writing, latest Xcode 12.4. After messing around with it, I've been able to figure it out; the trick is to make sure that at the time of pinning, the live preview is off. Then pin, change previews, and voila.

Related

missing alignment guides in xcode interface builder

I am new to programming on the Apple Mac. I have followed a programming guide supplied in the Mac Developer Library to program a basic GUI program called TrackMix. In this program you place a textbox, a vertical slider and a button control on the view window. Initially, on dragging the specific object, say the textbox, to the window, a set of alignment guides (dotted blue lines) would automatically appear on the canvas when the object is dragged over it. I dont know what has happened, but now those guides have disappeared when I execute the same action of dragging objects to the window. When the object being dragged is over the window a small green dot, with a plus sign in it, appears on the bottom of the object. I have carefully retraced my steps to be exactly the same as stated in the Developer Library, but still the problem persist. Have I, perhaps, involuntarily changed some Xcode settings or what? I am at the end of my wits! PS: I am using Xcode 7.
You have to toggle the menu item "Editor > Canvas > Snap To Guides" in Storyboard. I hope that helps
I am not sure whether this will be helpful, but I just had the same problem and the only thing which worked was re-installing Xcode (7.3) and trashing all of the Xcode preferences.
Good luck.

How to fix: disabling size classes in Xcode 6.2 trashes storyboard UI but keeps guides

[EDITED] After spending a couple of days on a iPad app (utility s/w for myself; not for release), I accidentally clicked on disabling size classes in Xcode (6.2). I only want to turn off Auto Layout temporarily so I could figure out why my popover scene was not rendering.
Now, all the UI elements are gone but the guidelines for both the main scene and the popover scene are still around. History seemingly shows nothing that will bring back the UI elements. I closed the Xcode project and opened it again, but only the red guidelines are visible.
Has anyone run into this? Any idea how to fix this? [EDIT] I'm referring specifically to the UI elements and getting them all back -- else I'm going to have to spend a couple of hours reconstructing and positioning them. I browsed StackOverflow and Google Search but I've not seen any relevant suggestions.
First, when disabling auto layout it will disable the size classes as well.
I would suggest that you update your Xcode to 6.3. Then that will probably be gone.
Hope that helps :)
Edit
regarding the comment
First off I would print the frames of the UIElements to see whether they are still on the screen. (Using `println("(button.frame)")
Then, if they are not there, change their frames / centres) to somewhere on the screen.
If they are in the bounds, check their sizes to make sure they are large enough to be visible. If they are then make sure they are not hidden and their alpha is 1.
In storyboard you can open the side-bar and then change the element's position in the Attributes inspector as shown here:

No horizontal scrollbar in Xcode's Interface Builder

When I try to edit a storyboard file in Xcode (Version 5.1.1 (5B1008) under OS X 10.9.3) I can only see the vertical scrollbar. Moving around in the horizontal direction between view controllers is not possible. The horizontal bar doesn't show when I hover over it. It only briefly shows when I select past the visible area but it immediately disappears afterwards and I can only scroll by a few pixels at a time this way.
I have tried restarting XCode and the OS but it didn't help. Scrolling was possible before. It stopped working for no apparent reason this morning. I have not updated XCode nor OS X or messed with the system in any way since it was last working. Has anyone encountered this problem before? Do I need to reinstall XCode at this point?
Press Shift + Scroll Mouse this will scroll preview in horizontal
It's a not bug, it's a feature. It wouldn't be a problem if you use the Apple mouse. There is a workaround for a typical 2/3 button mouse, although it would affect all horizontal bars across the system. Just follow System Preferences->General->Show scroll bars, and select Always.
I have been struggling with this as well. The only solution I found is the following:
So there is a mini map for the storyboard that hovers over the right upper-side.
If you can't see it, just click on the "Adjust Editor Options" button and make sure Minimap is selected.
This is the best way to move around just like you are using the scroll bars.

Not Displaying Normal Xcode View

First, the links are to screen shots of my "problem". Stackoverflow would not let me post images b/c I don't have at least a 10 reputation.
I am not sure what I did.
Shut down my computer, I think there was an OS X update pending that installed. When I went back to my Xcode project it presented the normal screen
https://docs.google.com/file/d/0BzpqJUv4HwzCbldESkRnZHR0Tk0/edit
But then when I went to open it up the following screen w/o the editor or any of the normal layout opened up.
https://docs.google.com/file/d/0BzpqJUv4HwzCZ2ZJOF9fSzAybUk/edit
I tried tinkering with the layout and view screens, but no real help. Not sure what happened. Any help would be most appreciated. Basically, it seems like I am missing the editor and utilities panes.
Thanks,
You see that little button with the left arrow and two vertical lines at the right upper end of the "Groups and files" view? Click and drag it left, see it this can help.

Xcode storyboard isn't visible; is it possible to zoom/pan the canvas?

I wouldn't ask if I couldn't find it anywhere else, but I've run into a problem. I have a complete storyboard built in Xcode, but I've lost it on the screen. Pressing the +/- buttons in the bottom right zoom in and out, but nothing shows up. I know the app is there because it runs fine, but all of my views are off the screen and I have no idea how to get them back. And since I'm on a desktop, there's no way to pan (maybe the same issue happens on a laptop?)
How do I get my storyboard back?
I searched for a "zoom all" in the menus but can't find one.
This is so frustrating. Grrr. I can't work on my storyboard until I can find it on the canvas. I can't find it on the canvas because I can't pan and have no idea where it is.
Right click on your storyboard file => Open As => iOS Storyboard

Resources