开发者

UIImageView animations crash when run on iphone device

I'm doing a fairly simple animation with two UIImageViews that works fine on the simulator, but the animation crashes the app when its run on the iphone device. The animation for each view involves 13 png's and just starts the animation with an animation duration of roughly 2.25 seconds. Both animations are run at the same time within a UIScrollView that lets the user scroll up and down to see the both the animations. I wouldn't think the animations are very large, but does anyone have any advice on what mig开发者_C百科ht be making the app crash? In my console it says the program received signal "0". Again, this runs perfectly in the simulator, so does anyone know why it would be crashing in the device?

Thanks!


I suspect that when you are initializing the NSMutableArray that contains the images at least one of them is nil. Adding nil objects to a NSMutableArray will generate an exception and cause your app to crash (see -addObject in NSMutableArray class reference).

I would check the image names to make sure that the case of each letter corresponds to the actual file name as the simulator is not case sensitive, unlike iOS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜