繁体   English   中英

在iPad上运行通用iOS应用程序尝试调用仅限iPhone的类

[英]Running universal iOS app on iPad tries to call iPhone-only class

我目前正在xCode上为iPhone和iPad编写应用程序。 这是普遍的。 我已经完成了iPhone部分,但我在iPad上停留了2天。 我创建了iPad的所有视图等,与iPhone不同。 当我将iPad视图控制器上的按钮连接到iPad视图时,它只会崩溃:

[Terminating app due to uncaught exception, [HelloiciousViewController aboutWindowOpener]: unrecognized selector sent to instance 0x5b7c180.

HelloiciousViewController是iPhone视图控制器,主要是它,我在iPad上与它无关。 但它以某种方式连接到它并尝试在其上启动aboutWindowOpener方法。 我的iPad aboutWindow开放的方法是aboutWindowAc 检查了一切十次,它与iPhone界面无关 为什么会这样?

描述您使用通用应用程序所采用的方法。 你有两个appDelegates吗? 无论如何,请确保在plist中使用NSMainNibFileNSMainNibFile~ipad键定义iPhone和iPad Main .xib文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM