XCode: Search in Assistant Editor

I’m often in a situation where I have my storyboard open in XCode, then I open up the Assistant Editor to connect something from the storyboard, to my code, only to find the wrong file in the Assistant Editor!

Usually, I would go to the Assistant Editor, and manually go through the navigation system to find the file I need. But recently, I learned that I didn’t have a very important option in XCode turned on!

XCode Navigation

If you go to your XCode > Preferences > Navigation, select the Uses Focused Editor option. Now, you can search in your Assistant Editor just like in you would in your main editor (Command + Shift + O FTW!) as long as it’s focused!

Wish I knew about this earlier!

Enjoy the article? Join over 17,500+ Swift developers and enthusiasts who get my weekly updates.

  • ricardoduarte

    Cool tip thanks:)

  • Marian

    When you use Option + Enter when you search using Command + Shift + O, it opens the file in assistant editor. Or for your use case you should be able to use Cmd-Opt-Shift-Z to reset the assistant editor to automatic mode.