简体   繁体   English

Xcode从viewcontroller.swift跳转到storyboard

[英]Xcode jump from viewcontroller.swift to storyboard

I'm working on a large ios app and I'm also a newb. 我正在开发一个大型ios应用程序,我也是一个新手。 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. 我在.swift文件中,我需要一个快速的方法来确定哪个场景与该swift控制器文件相关联。 The only way I know now is to go through each scene and look at the Class property, which will take forever. 我现在知道的唯一方法是遍历每个场景并查看Class属性,这将永远需要。 Is there a shortcut to jump from the swift file to the associated scene? 是否有快捷方式从快速文件跳转到相关场景?

在此输入图像描述

  1. In Xcode, open " Find in Workspace... " ( Command + Shift + F ) 在Xcode中,打开“ 在工作区中查找... ”( Command + Shift + F
  2. Type the name of your ViewController. 输入ViewController的名称。
  3. In the results panel, check the entries under the .storyboard file. 在结果面板中,检查.storyboard文件下的条目。 Clicking on them will open that exactly scene in the Interface Builder. 单击它们将在Interface Builder中打开该确切的场景。
  4. Profit. 利润。

You can also go further and filter the search by filetype . 您还可以进一步按文件类型过滤搜索。 Check this out: 看一下这个:

Create a custom Scope: 创建自定义范围:

在此输入图像描述

Super awesome result: 超级棒的结果:

自定义范围FTW

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 xcode:故事板不反映ViewController.swift中代码中所做的更改 - xcode : storyboard does not reflect changes made in code in ViewController.swift 如何在 Storyboard 中将 ViewController.swift 连接到 ViewController? - How to connect ViewController.swift to ViewController in Storyboard? 在 Xcode 中初始化新项目时没有 main.storyboard 或 ViewController.swift? - No main.storyboard or ViewController.swift upon initialization of new project in Xcode? Xcode:在 ViewController.swift 中禁用视图的旋转 - Xcode: Disable rotation for a view in the ViewController.swift 从Main.storyboard拖放到ViewController.swift时,我无法更改连接和对象 - I can't change connection and object when drag and drop from Main.storyboard to ViewController.swift 如何从 viewcontroller.swift 文件导航到 *.storyboard 文件中的相应场景? - How navigate from viewcontroller.swift file to corresponding scene in *.storyboard file? Xcode 10.1 ViewController.h 与 ViewController.swift - Xcode 10.1 ViewController.h vs ViewController.swift 从ViewController.swift获取变量 - Getting a variable from ViewController.swift Xcode 6-我无法将任何东西从我的IB连接到ViewController.swift - Xcode 6 - I Can't connect anything from my IB to ViewController.swift 什么是ViewController.swift(接口)文件 - 在Counterparts中 - What is the ViewController.swift (Interface) file for - in Counterparts
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM