Where did the Object Library go in Xcode 10? - xcode

In Xcode 10, where is the Object Library which shows view and controller objects, code snippets and media that used to appear towards the lower right corner in Xcode 9 and older?
Xcode 9:
Xcode 10:

Shortcuts:
Shift + Command + L: Show Library.
Shift + Command + M: Show Media Library.
Xcode 10 has added a toolbar button to access the Object Library.
From a thread on Apple Developer Forum:
Library content has moved from the bottom of the Inspector area to an overlay window, which can be moved and resized like Spotlight search. It dismisses once items are dragged, but holding the Option key before dragging will keep the library open for an additional drag.
The library can be opened via a new toolbar button, the View > Libraries menu, or the ⇧⌘L keyboard shortcut. Content dynamically matches the active editor, so the same UI provides access to code snippets, Interface Builder, SpriteKit, or SceneKit items. The media library is available via a long press on the toolbar button, the View > Libraries menu, or the ⇧⌘M keyboard shortcut. (37318979, 39885726)

What the existing answers (so far) neglect to mention is that if you hold Option as you summon the Library window — i.e., press Shift + Option + Command + L, or hold Option while clicking the Library button in the toolbar — the window stays open, permanently, until you explicitly close it with its Close button.
It is not incorporated (docked) into the current project window, but it can be used in any project. The point is that it becomes almost a normal window (to be precise, it becomes a normal floating window).

XCode 11 - Object library location
Click on the plus icon on the top right corner of Xcode topbar.

The library can be opened via a new toolbar button, the View → Libraries menu, or the Shift + Command + L keyboard shortcut.The media library is available via a long press on the toolbar button, the View → Libraries menu, or the Shift + Command + M keyboard shortcut.
Library content has moved from the bottom of the Inspector area to an overlay window, which can be moved and resized like Spotlight search. It dismisses once items are dragged, but holding the Option key before dragging will keep the library open for an additional drag.

In Xcode 11 use Shift + Command + L to show the Object Library.

Xcode 12 users can find the same option as the Xcode 11 as written above.
Shift Command L to bring up the Objects/Image/Color and other context-sensitive libraries.
There is also the + sign at the top right of the window titled Library when you mouseover.
This drove me crazy trying to follow a tutorial that was likely written for Xcode 10. Thanks for the rest of those that answered!

Related

How to show view controls in the new update of Xcode 12?

I have updated xcode to the latest version ( Version 12.0 (12A7209)) and I can't show the toggle icons that show/hide inspector, debug or navigator Area
How can I show them again?
For the navigator the button is now at the far left, or use Command 0.
For the inspector the button is now at the far right, or use Command Option 0.
Also, in full screen mode you can summon the inspectors as overlays by hovering at the side with the mouse. Very cool as it saves space.
For the debug area there is no button; use Shift Command Y.
Basically this is a good time to learn the keyboard shortcuts!

Xcode Preview Resume Button Shortcut

Is there a keyboard-shortcut to click the resume button in the canvas on Xcode Previews, instead of clicking it every time?
⌘ command + option + P is what you're looking for.
Quick Answer
Editor -> Previews -> Refresh
Refresh canvas shortcut
⌥ option + ⌘ command + P
Open canvas shortcut
⌥ option + ⌘ command + ↩ return
💡 Automated way to refresh the preview
Note that there is an option called Automatically Refresh Canvas that is enabled by default and helps you to not refreshing it manually again and again.
🎁 How to find ANY macOS apps shortcuts
In almost all macOS apps, you can use help menu to find the submenu item you want (some kind of preview in this case). And it will show you the exact location of the submenu alongside the associated shortcut:
I have searched for preview for this case :)

XCode 8.1 shows same file side by side, no 'x' button to remove second window

After a few months of not writing any iOS code I upgraded to XCode 8.1 and opened a project. Strangely I am seeing two windows (see pasted image below). Annoyingly these two screens move in sync, show the same file, etc, but one cannot be closed. There is no 'X' at the top to close the window. Has anyone run into this and how can I get rid of one of the screens?
Probably you activated the version editor without noticing it. To revert to the standard editor, hit the button on the top right corner of the window with a drawing showing lines justified to the left (right next to a button with two circles and another with arrows).
Alternatively go to the menu:
View -> Standard Editor -> Show Standard Editor
or hit the Command + Return keys.
That should do it.

What is the shortcut for inspecting elements in Firefox

I read the documentation about Firefox's page inspector. I didn't find any shortcut for inspecting an element directly without clicking the button 'choose element with mouse'. The documentation for opening the inspector itself even looks to be wrong.
You open it with cmd + option + i on OSX rather than cmd + option + c as described in the documentation.
Using Firefox v24
It seems that Ctrl+Shift+C always open the inspector in "choose element with mouse" mode. [Linux, FF 26.0. Also works in Chrome.]
It's not exactly the same flow as context menu -> inspect element but I find it more useful. The hover tooltip sometimes gives me all the info I need. And it's more reliable — just opening the context menu generates a mouse event while Ctrl+Shift+C doesn't. E.g. with CodeMirror which plays games with invisible elements, using context menu usually lands me in the hidden textarea or fake cursor, while "choose with mouse" mode reliably gives me the styled editor content I wanted to inspect.
Windows: Ctrl+Shift+C.
Mac: Cmd+Option+C.
Ctr + Shift + C and function F12 button is default inspect element button for every browser.
So if firebug isn't installed in your firefox then F12 button is the shortest shortcut for your goal.
I'm not sure about the way you do it in Mac OS, but on windows, if you select the element by pressing tab until you reach it, if you press the context menu key and then Q, you open the inspector on that specific element, like it happens when you right click on it.
I believe the context menu key is not a mac thing, but it seems that there are people that worked around to do it. See this question: How do I open the context menu from a Mac keyboard?.
On Mac (I'm using Yosemite though), it's Command ⌘ + Option + c.
On Linux (Ubuntu 18.04) and Firefox (version 72.0.2) it's CTRL + SHIFT + i , or hotkey F12.

How to cycle through xcode windows (or open 'help' within the bottom pane)?

In Xcode 3.2 the help/reference pops up in a new window when I ALT, CMD, DOUBLECLICK on a class name**. In previous versions it looks like it used to open up in the bottom pane of the main Xcode window. Can I replicate that in 3.2+?
The problem I'm having is that if either one of the Xcode windows (help or main) is maximised, it's easy to loose one window behind the other, and I seem unable to cycle through the individual Xcode windows (the normal window cycling doesn't work - both windows just show up as one item, 'Xcode').
I'd be happy to find out how to cycle through the Xcode windows or bring up the help window in the bottom pane, as it was in prior versions. Currently I'm using Expose to access the hidden window - which is okay, but not optimal.
Thanks.
** ALT & DOUBLE-CLICK now brings up QuickHelp in 3.2
Can you not simply type Command-~ (command tilde)? That works for me and is the common method of cycling between the windows of an application.
At least with XCode 4, but probably with 3 too, you can use Ctrl+Command+Arrows for navigating between tabs. The Up/Down buttons will switch between header files and source files and the Left/Right between opened windows/tabs.

Resources