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?
Xcode jump from viewcontroller.swift to storyboard
Asked Answered
- In Xcode, open "Find in Workspace..." (Command+Shift+F)
- Type the name of your ViewController.
- In the results panel, check the entries under the .storyboard file. Clicking on them will open that exactly scene in the Interface Builder.
- Profit.
You can also go further and filter the search by filetype. Check this out:
Create a custom Scope:
Super awesome result:
Another way: Put the cursor in the class name "LoginController" or highlight it, then do Find -> Find Selected Text In Project –
Hagai
© 2022 - 2024 — McMap. All rights reserved.