0

我尝试将背景图像放在我的视图屏幕上,但我可能会添加失败。当我运行它时,我SIGABRT带我回到main.m. 我尝试减小图像大小,删除图像,最后只是注释掉我添加的代码。然而它仍然没有运行。这是调试区域中显示的内容:

2011-07-23 08:10:23.829 Soleternity[1229:fe03] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x7209da0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key play.'
*** First throw call stack:
(0x1114142 0x12a2ca7 0x1114001 0xaf89dc 0xa6aa0f 0xa6a97f 0xa85884 0x3c8fde 0x1115f0a 0x107f891 0x3c7b32 0x3c96d4 0x1b1171 0x1b1488 0x1b08a6 0x1bf624 0x1c008c 0x1b3ac4 0x2ee8876 0x10e8305 0x104ceb2 0x104b79a 0x104ac44 0x104ab5b 0x1b038d 0x1b1ab6 0x20a2 0x2015)
4

1 回答 1

0

这可能会发生,因为您的图像以某种方式从构建包中丢失。尝试:

  • 删除您的图像
  • 清理你的构建。
  • 再次添加并构建。

您还可以检查图像是否真的称为播放。

另外,您是否将图像添加到 UIImageView IBOulet?

编辑1:

你搞好了没:

 #import <AVFoundation/AVAudioPlayer.h>

并且还将框架添加到您的构建中?

于 2011-07-23T15:12:34.487 回答