gpt4 book ai didi

ios - ViewController 的 Storyboard 助理编辑器打开 -Swift.h 而不是 .swift

转载 作者:搜寻专家 更新时间:2023-10-31 22:32:03 24 4
gpt4 key购买 nike

我有一个程序化的 swift 项目,我正在将其转换为 Storyboard。一个特定的交互正在磨我的齿轮。

当我在 Storyboard中单击 View Controller MyViewController 时,助理编辑器会打开 myProjectName-swift.h 而不是 MyViewController.swift

我知道我可以单击辅助编辑器的导航栏并从 automatic 下拉列表中选择我的 VC,但这只是在我每次在 Storyboard 中切换 VC 时添加更多操作。

最佳答案

当您设置类以匹配您的 View Controller 时,通常助理编辑器会打开正确的文件。

这是选择类的方法:

  • 在 Storyboard中选择你的 View Controller
  • 打开身份检查器
  • 从列表中选择类(class)

    identity inspector

关于ios - ViewController 的 Storyboard 助理编辑器打开 <projectName>-Swift.h 而不是 <viewController>.swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37577419/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com