故事板身份检查器中未显示自定义类 [英] Custom class not shown in the storyboard identity inspector

查看:70
本文介绍了故事板身份检查器中未显示自定义类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中创建了一个名为 EmpresasTableViewController 的新类,然后在情节提要中将 CategoriasViewController 复制到EmpresasTableViewController,我只想为该类分配 EmpresasTableViewController 转到情节提要中的 EmpresasTableViewController ,但是 EmpresasViewController 名称未出现在 Identity Inspector 中.

I created in my app a new class named EmpresasTableViewController, and in the storyboard I copied CategoriasViewController to EmpresasTableViewController, I just want to assign the class EmpresasTableViewController to EmpresasTableViewController in the storyboard, but the name EmpresasViewController doesn't appear in the Identity Inspector.

创建类后没有任何错误,但是为什么未在 Custom Class 下的情节提要 Identity Inspector 中将其显示为类?显示.

There are no errors after creating the class, but why is it not shown as a class in the storyboard Identity Inspector under Custom Class?, all other view controllers are shown.

推荐答案

首先,需要保存所有文件.

Firstly, all your files needs to be saved.

您可以尝试的是:

选项1.关闭并重新打开项目的 Xcode .

Option 1. Close and reopen Xcode with your project.

选项2.清理项目并重新构建.

Option 2. Clean your project and build it again.

选项3.强制 Xcode 再次为项目建立索引:

Option 3. Force Xcode to do the indexing of your project once again:

打开 Organizer (窗口">管理器"),然后选择 Projects 模式.在左侧视图中选择您的项目,然后单击 Delete ... 项目的 Derived Data 的按钮.

Open the Organizer (Window > Organizer) and select the Projects mode. Select your project in the left-hand view and then click the Delete... button for the project's Derived Data.

这将删除项目的代码检测索引,并强制 Xcode 重建索引,这可能会解决问题.

This will delete the code sense index for the project and force Xcode to rebuild the index, which may fix the problem.

这篇关于故事板身份检查器中未显示自定义类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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