Interface Builder文件中的未知类。 Xcode 6和Swift [英] Unknown class in Interface Builder file. Xcode 6 and Swift

查看:152
本文介绍了Interface Builder文件中的未知类。 Xcode 6和Swift的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用swift开始了一个vanilla master详细项目。如果我添加一个新的视图控制器并设置自定义类,则模块列表为空,并且无法选择模块。错误消息Interface Builder文件中的未知类。如果我运行代码,则会出现在控制台中。
如何设置故事板以了解自定义类和模块?

I started a vanilla master detail project with swift. If I add a new view controller and set the custom class, then the modules list is empty and it is not possible to choose a module. The error message "Unknown class in Interface Builder file." appears in the console if I run the code. How can I setup the storyboard to know the custom class and module?

它应该如何。模板中的两个类都很好。

How it should be. The two classes from the template are just fine.

以及它是如何

我必须添加 customModule =Target_NamecustomModuleProvider =将定位到界面构建器源代码。那太烦人了!

I have to add customModule="Target_Name" customModuleProvider="target" to the interface builder source code. That is really annoying!

更新:
如果我将整个项目目录移动到另一个目录,例如到桌面它的工作原理。看起来我的名为Repository的目录已损坏。不知道为什么:(

Update: If I move the whole project directory to another, e.g. to the desktop it works. Looks like my directory with the name "Repository" is broken. Don't know why :(

推荐答案

我曾经遇到同样的问题,我终于发现了StoryBoard的目标会员资格设置错误

I used to encounter the same issue, I finally found that the StoryBoard's Target Membership has been set incorrectly

这篇关于Interface Builder文件中的未知类。 Xcode 6和Swift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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