我在Xcode上得到一个错误说没有关于视图控制器的信息。
无法插入新的出口连接:无法找到所命名类的任何信息
为什么会这样?
我在Xcode上得到一个错误说没有关于视图控制器的信息。
无法插入新的出口连接:无法找到所命名类的任何信息
为什么会这样?
当前回答
以下是一些可以解决这个问题的方法(难度依次递增):
Clean the project (Product > Clean) Manually paste in @IBOutlet weak var viewName: UIView! // or @IBAction func viewTapped(_ sender: Any) { } and control drag to it. (Change type as needed.) Also see this. Completely close Xcode and restart your project. Delete the Derived Data folder (Go to Xcode > Preferences > Locations and click the gray arrow by the Derived Data folder. Then delete your project folder.) Click delete on the class, remove reference (not Move to Trash), and add it back again. (see this answer)
其他回答
我也有同样的问题。我疲倦了下面的解决方案,但没有工作:
清洁项目(cmd + shift + k),甚至清洁项目构建(cmd + shift + alt + k) 删除派生数据和模块缓存内容
以下是该问题的解决方案:
移动到源代码文件,手动编写IBOutlet / IBAction(最好是复制粘贴)
然后移动到故事板文件和打开实用程序窗口 连接检查器 然后用Interface Builder连接源文件中编写的IBOutlet和IBAction。
最简单的解决方案:我使用xCode 7和iOS 9。
在你的。m
#导入“VC.h”
保存.m并再次链接您的outlet,它可以正常工作。
我也有同样的问题。当我试图通过控制拖动创建一个出口时,我意识到在X-Code手册中选择了项目
我把它设置为自动后,它就工作了
当我在Objective-C项目中添加一个Swift文件时,就发生了这种情况。 在这种情况下,你能做的就是。
选择MY_FILE.Swift >>删除>>删除引用 选择MY_FOLDER >>添加MY_FILE.Swift 瞧!你可以出发了。
以下是一些可以解决这个问题的方法(难度依次递增):
Clean the project (Product > Clean) Manually paste in @IBOutlet weak var viewName: UIView! // or @IBAction func viewTapped(_ sender: Any) { } and control drag to it. (Change type as needed.) Also see this. Completely close Xcode and restart your project. Delete the Derived Data folder (Go to Xcode > Preferences > Locations and click the gray arrow by the Derived Data folder. Then delete your project folder.) Click delete on the class, remove reference (not Move to Trash), and add it back again. (see this answer)