On Aug 12, 2009, at 11:03 PM, John Michael Zorko wrote:

However, though replacing imageNamed with imageFromContentsOfFile works wherever I set a UIImageView's image property, doing so to load the PNG images into my animation array results in the animation being invisible on the device, though it works in the simulator. Here's my code:

Try lengthening your animation time. I would bet that your encountering a bug where the animation starts before all of the images are ready and thus it skips some part of the animation. If your animation is particular short, you just get completely skipped.

I've tried various combinations of the inDirectory parameter, to no avail -- it plays on the sim, not on the device. However, using UIImage imageNamed works on the device, but uses up a lot of memory that causes my glitch.


The memory usage is the same in both cases, the only difference is that +imageNamed: has already decompressed the image before it returns. The image still must be decompressed in either case for the animation to actually occur. When you use +imageNamed: your animation likes works because the images are already ready.

But if your getting memory glitches, it sounds like your images are awfully large...
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to