Xcode jump from viewcontroller.swift to storyboard
Asked Answered
A

1

5

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?

Ala answered 23/5, 2016 at 21:49 Comment(0)
S
11

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

Semirigid answered 23/5, 2016 at 23:28 Comment(1)
Another way: Put the cursor in the class name "LoginController" or highlight it, then do Find -> Find Selected Text In ProjectHagai

© 2022 - 2024 — McMap. All rights reserved.