문제

I tried putting a background image onto my view screen, unsuccessfully I might add. When I ran it I got SIGABRT taking me back to main.m. I tried reducing the image size, deleting the image, and finally just commenting out the code I had added to do it. Yet it still doesn't run. This is what shows up in the debug area:

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)
도움이 되었습니까?

해결책

That could happen because your image is missing from the build bundle somehow. Try:

  • Remove your image
  • Clean your build.
  • Add it again and build.

You can also check if the image is really called play.

Also, are you adding an image to an UIImageView IBOulet?

Edit 1:

Have you done:

 #import <AVFoundation/AVAudioPlayer.h>

And also added the framework to your build?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top