自定义类未显示在下拉列表中Xcode 7.2.1

时间:2016-02-23 04:50:52

标签: xcode class viewcontroller

我有一个ViewController和一个我添加到项目中的自定义ViewController Custom Class。但是,当我去设置“自定义班级”时,在Storyboard中的视图控制器上的属性我的自定义类没有出现在列表中。

查看我的新头文件,文件名为" ViewController + SecondViewController.h" 我已经尝试将文件重命名为SecondViewController.h但仍未显示自定义类。 检查它是否是ViewController的子类 编译程序只是为了确保xcode正在处理最新信息。 重启xcode。重启我的Mac Book。删除了DerivedData。键入新视图控制器的名称,但我仍然无法连接到新的自定义类。什么会导致我的班级没有出现在“自定义班级”中。落下?是否有与Xcode 7.2.1不同的内容以及新客户类的命名方式。我在Xcode 7.2之前创建了其他自定义类,并且从未看到名称显示为ViewController + SecondViewController,并且从未出现过显示自定义类的问题。

1 个答案:

答案 0 :(得分:0)

通过重命名我的" ViewController + SecondViewController.h"修复了我的问题。到" SecondViewController.h"和" SecondViewController.m"