故事板uiviewcontroller,“自定义类"未显示在下拉列表中 [英] Storyboard uiviewcontroller, 'custom class' not showing in drop down

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

问题描述

我有一个在应用程序故事板上创建的UIViewController,还有一个自定义UIViewController子类,该子类已添加到项目中(并且正确地处于目标的编译阶段).但是,当我在情节提要中的视图控制器上设置自定义类"属性时,我的自定义类不会显示在列表中.

I have a UIViewController I created in my apps storyboard, as well as a custom UIViewController subclass which I added to the project (and is correctly in the compile phase for my target). However when I go to set the 'Custom Class' property on the view-controller in Storyboard my custom class does not show up on the list.

  • 已检查该类是否是我的应用程序目标的一部分,而不是测试的一部分.
  • 再次检查它是否正确是UIViewController的子类
  • 已编译的程序只是为了确保xcode使用最新信息
  • 重新启动xcode

什么会导致我的班级没有出现在自定义班级"下拉列表中?

What would cause my class to not show up in the 'Custom Class' drop down?

推荐答案

我发现了两种解决问题的方法,但它们都是可以解决的. 1.只需在文本字段中输入视图控制器名称,或2.关闭项目,然后重新打开它,并在项目初始化中将文件放置在列表中.

Two ways I found that solve the problem but they are work arounds. 1. Just type the view controllers name in the text field, or 2. close the project and then reopen it and in the project initialization it places the file on the list.

这篇关于故事板uiviewcontroller,“自定义类"未显示在下拉列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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