Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode jump from viewcontroller.swift to storyboard

I'm working on a large ios app and I'm also a newb. I'm trying to find the correct scene in a storyboard in a large app. I'm in the .swift file and I need a quick way to figure out which scene is associated with that swift controller file. The only way I know now is to go through each scene and look at the Class property, which will take forever. Is there a shortcut to jump from the swift file to the associated scene?

like image 365
user441058 Avatar asked Dec 24 '22 05:12

user441058


1 Answers

enter image description here

  1. In Xcode, open "Find in Workspace..." (Command+Shift+F)
  2. Type the name of your ViewController.
  3. In the results panel, check the entries under the .storyboard file. Clicking on them will open that exactly scene in the Interface Builder.
  4. Profit.

You can also go further and filter the search by filetype. Check this out:

Create a custom Scope:

enter image description here

Super awesome result:

Custom scope FTW

like image 190
backslash-f Avatar answered Dec 26 '22 19:12

backslash-f