0

我正在制作一个通用应用程序(目标设备系列 --> iphone/ipad)。它在 iphone 和 ipad 上运行得非常好,但在 iPod touch 上,我没有收到任何警告或错误,我的 xcode 显示它正在运行,但我的 iPod touch 屏幕变成黑色。

我不明白为什么它会这样。有任何想法吗?

我的控制台输出是:

[Session started at 2011-03-09 17:59:01 +0500.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1510) (Fri Oct 22 04:12:10 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
Loading program into debugger…
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-25686-91
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
sharedlibrary apply-load-rules all
continue
4

2 回答 2

1

I had that problem, too. In the project's info plist file I had keys: "Main nib file base name (iPad)" set to "MainWindowForiPad" and "Main nib file base name (iPhone)" set to "MainWindowForiPhone". The solution was to add a third MainWindow key "Main nib file base name", which I set to "MainWindowForiPhone" also.

Like Kim said in the previous answer, the iPodTouch does not load the MainWindow nib associated with the iPhone's key, it loads the MainWindow under general key "Main nib file base name".

于 2011-03-11T15:24:06.290 回答
0

可能是您在 plistfile 中指定了两个 .nib 文件在启动时加载。一款用于 iPad,一款用于 iPhone。ipod touch 实际上需要自己的 nib 文件来加载。

看看 iPod Touch 4G 还以为是 iPad

于 2011-03-10T14:31:26.460 回答