无法插入新的插座连接:找不到已命名的类的任何信息 [英] Could not insert new outlet connection: Could not find any information for the class named

查看:74
本文介绍了无法插入新的插座连接:找不到已命名的类的任何信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Xcode上收到错误,说没有关于视图控制器的信息。

I got an error on Xcode saying that there was no information about the view controller.


无法插入新的插座连接:可能找不到名为

Could not insert new outlet connection: Could not find any information for the class named

为什么会发生这种情况?

Why is this happening?

推荐答案

以下是一些可以解决此问题的事情(按难度递增顺序) :

Here are some things that can fix this (in increasing order of difficulty):


  • 清理项目(产品>清洁

  • 手动粘贴

  • 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.) (Idea from this answer. Please upvote it.)

完全关闭Xcode并重新启动项目。

Completely close Xcode and restart your project.

这篇关于无法插入新的插座连接:找不到已命名的类的任何信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆