WatchKit错误 - 无法找到实例化的接口控制器类'' [英] WatchKit error - unable to find interface controller class '' to instantiate
问题描述
每当我在 WKIInterfaceController
的子类中建立任何连接时,我都会收到错误 WatchKit错误 - 无法找到接口控制器类'myClass'来实例化
和一个活动指示器显示在模拟器中,视图不加载。断开所有连接并正确显示视图但仍然出现错误
Whenever I make any connections in my subclass of WKIInterfaceController
I get error WatchKit error - unable to find interface controller class 'myClass' to instantiate
and a activity indicator showing in simulator and the view does not load. Disconnect all conections and the view displays correctly but still get the error
尝试
无法找到接口控制器类'InterfaceController'来实例化
WatchKit reloadRootControllersWithNames导致错误,使用pageController或推/弹后
两个链接提示错误,如果这是一个错误肯定不会出现在XCode的发布版本上,每个人都会遇到相同的行为,只能渲染watcKit而无用吗?
Two links suggests a bug, If it is a bug this would surely not be present on the release version of XCode and everyone would experience the same behaviour rendering watcKit all but useless?
推荐答案
对于其他拥有此功能的人。在创建课程时,必须将类设置为正确的目标成员资格,即 yourApp WatchKit Extension
,而不是 yourApp WatchKit App
。它也可以在界面构建器中的目标成员身份中进行编辑。
For anyone else who has this. The class must be set to the correct target membership ie yourApp WatchKit Extension
rather than yourApp WatchKit App
when creating your class. It can also be edited in Target membership in interface builder.
这篇关于WatchKit错误 - 无法找到实例化的接口控制器类''的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!