Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是发生的事情:
我试图在我的视图控制器中创建一个 IBAction 方法但没有成功。它只是不连接。
附加信息:在 macOS 10.13(测试版)上运行的 Xcode 9.0(测试版)
您能否检查一下您是否WelcomeViewController在 Storyboard 的视图控制器对象中设置为类。您可以在情节提要的 Identity Inspector 选项卡中进行检查。如果不是,请设置类并尝试连接。
WelcomeViewController
或者,如果没有任何效果,请在类中编写 IBAction,然后转到情节提要 > 连接检查器选项卡,然后通过从连接检查器中的引用拖放到按钮从那里连接它。