Re: UIImageView animationImages problem
Re: UIImageView animationImages problem
- Subject: Re: UIImageView animationImages problem
- From: patrick machielse <email@hidden>
- Date: Wed, 10 Mar 2010 15:56:11 +0100
Op 9 mrt 2010, om 21:21 heeft David Duncan het volgende geschreven:
> In part this is decoding the image (if they haven't been previously decoded). Are you using +imageNamed: or +imageWithContentsOfFile: to load the images?
I'm using imageWithContentsOfFile:. Mainly this is because I need to manage a fair number of images, and the search algorithm used by imageNamed: won't work with the way my resources are organized inside the main bundle.
>> Is there a better solution to get animationImages to work reliably? Am I doing something wrong? Can I force loading of my UIImage array 'by hand'?
>
> If you can spare the memory, you might just use +imageNamed: instead. Overall however, I generally recommend against using animationImages for fullscreen animations as the memory requirements grow rather quickly. I would generally recommend that you break your animations down into constituent pieces and do the animation in a combination of cycling images and code to move the views presenting the animation.
That's just going to be too labor intensive I'm afraid. It would mean I'd have to work in close coordination with the artist who is creating the animations. And if we later want to add (sell) more animations, there would be more coding required, instead of just packaging up resources. To give an impression: initially I will need to add ~ 30 animations.
As far as I can see, there would be three methods of displaying animations:
- Run a movie file inside a view. Easiest but not possible at the moment.
- Use frames in .animationImages. Not memory efficient, no audio, fiddly about preloading images.
- Animate individual parts of the screen by code. Less (or no) code <> resource separation, labor intensive.
I think I'll have to make do with animationImages for now.
patrick_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden