问题描述
我在应用程序中创建了一个名为 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:
这将删除项目的代码检测索引,并强制 Xcode
重建索引,这可能会解决问题.
This will delete the code sense index for the project and force Xcode
to rebuild the index, which may fix the problem.
这篇关于故事板身份检查器中未显示自定义类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!