我在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)
其他回答
最好的答案中没有一个对我有用。都快疯了。然后注意到助理编辑器以某种方式被设置为手动,我在ViewController.swift(接口)而不是ViewController.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)
对我来说,它在右边选项卡>本地化时工作,我选中了英语复选框。最初只检查了Base。从那以后,我再也没有问题了。希望这能有所帮助!
只需执行以下两个步骤来消除此错误
清洁项目使用产品>清洁 运行项目
现在尝试添加动作或出口。 就是这样。
快乐的编码
在我的情况下,这是bc,我在IB中选择了一个新的UIViewController文件,然后尝试按住鼠标拖动到这个新控制器,而不首先删除连接检查器中的先前连接。先删除这些,然后再试一次。