Tricks for the Toolbar in Xcode

Jonathan Wong
5 min readApr 17, 2019

The toolbar in Xcode is one of the most commonly used elements in Xcode. I’m sure as a developer for Apple platforms you know how to use the Toolbar by clicking on the different icons with your mouse. But sometimes, whether you’re sitting on your couch with your Macbook in your lap, or you’re at your favorite coffee shop getting some work done, sometimes you need a little more screen real estate. Let’s look at how to do those toolbar tasks, without the toolbar.

Hiding the Toolbar

First things first, let’s gain some more screen real estate by hiding the toolbar. This can be done with ⌘ ⌥ T . To bring it back, you can use the same hotkey.

Window Management

Starting from the left to the right in the toolbar, there are the red, yellow, and green buttons to help manage your window.

Red — if you want to close the instance of Xcode but not quit Xcode completely, you can use the standard hotkey on the Mac to close the window with ⌘ W . If you have multiple tabs opened in Xcode, it’ll close those tabs first before closing your project. This is because each of those tabs is individual instances of Xcode running.

Yellow — to minimize Xcode, you can use the standard hotkey on the Mac ⌘ M .

Green — to enter full-screen mode, you can use ⌘ ⌃ F .

Play and Stop

Seeing how these are probably the most used hotkeys in Xcode, you probably already know them. But if you don’t, you can run your app with ⌘ R and stop it with ⌘ . .

If you want to use the other scheme actions without using your mouse, you can test with ⌘ U , profile with ⌘ I , and analyze with ⌘ ⇧ B .

Schemes and Run Destinations

I learned about these relatively recently after being tired of constantly having to change from running my app to running unit tests and on which simulator or device I was going to run on. If you’re familiar with showing and hiding the Navigator area and Utility areas in Xcode with ⌘ 0 and ⌘ ⌥ 0 , choosing which scheme and run destination are similar. You can use ⌃ 0 and ⌃ ⇧ 0 to access the scheme and run destinations respectively. If you stopped there, and just used your arrow keys to access your scheme and run destinations, that would be ok, but we can do better! After you use ⌃ 0 or ⌃ ⇧ 0 , just start typing the name of the scheme or run destination, whichever one you are trying to select, and Xcode will narrow down that list for you! I’ve found this to be super helpful on projects with many schemes to choose from.

If you only have a few schemes to choose from, it might be easier to just cycle through them. Similarly to how you cycle through tabs with ⌘ { and ⌘ } throughout macOS and Xcode, you can use ⌘ ⌃ [ and ⌘ ⌃ ] to cycle through your schemes. If you want to cycle through your run destinations, just add the key (⌘ ⌃ ⌥ [ and ⌘ ⌃ ⌥ ] ).

Status Bar

The toolbar can give you some useful information about the state of your project like how many warnings and/or build errors you have. If you really want to drill down into your issues, however, you’re most likely going to have to use either the Issue Navigator, that you can access with ⌘ 5 or the Report Navigator with ⌘ 9 . With either of the navigators, you’re able to use the arrow keys to cycle through your issues and reports.

In the Issue Navigator, once you find an issue you want to actually work on with the arrow keys, you can use ⌘ J to move the focus to the editor you want.

Library

Love it or hate it, as of Xcode 10, Apple has moved accessing your UI elements and code snippets into this new library button. At least the hotkey is the same for either of these with ⌘ ⇧ L .

Editors

In order to cycle through the version editors, you use ⌘ ↩ for the Standard editor, ⌘ ⌥ ↩ for the Assistant editor, and ⌘ ⌥ ↩ ⇧ for the Version editor.

Navigator, Debug, and Utility Areas

If you find yourself in the need of more screen real estate, or maybe you just want to focus on specific tasks at hand, like removing the navigators when you’re editing a storyboard, you can use ⌘ 0 and ⌘ ⌥ 0 to hide and show the navigators and inspectors respectively. If you want to hide and show the debug area, you can use ⌘ ⇧ Y . Compared to using ⌘ 0 and ⌘ ⌥ 0 for the other buttons in this group, sometimes I think, “why (Y) did Apple use ⌘ ⇧ Y for the debug area” and it helps me remember it, maybe it’ll help you too!

Conclusion

In this post, we looked at ways to access the functionality of the toolbar, without using our mouse, including hiding the toolbar completely. Now whether you decide to hide the toolbar or not, I hope you have a few more hotkeys under your toolbelt to make you more productive. To help you remember these, you can look at my cheat sheet on GitHub.

If you liked this, check out my course, Becoming an Xcode Power User on Pluralsight where we go over topics like projects, schemes, setting up targets, tabbed and windowed workflows, and productivity in Xcode to name a few.

--

--

Jonathan Wong

Cook, eat, run… San Diego Software Engineer, Pluralsight Author, RW Team Member