Re: Little suggestion for many many images app, best approach.
Re: Little suggestion for many many images app, best approach.
- Subject: Re: Little suggestion for many many images app, best approach.
- From: Matt Neuburg <email@hidden>
- Date: Sat, 20 Nov 2010 07:15:55 -0800
On Fri, 19 Nov 2010 21:47:34 +0100, Gustavo Pizano <email@hidden> said:
>Hello everyone.
> The thing is.. because the user can drag many small images from one view to another (big UIView that has the screen size), in cocos I was thinking using a SpriteSheet, something like an atlas of all images together in a png and I just load the area defined by a rect of that atlas, this way performance will not be affected so much when having let's say 70 images at the same time, also memory usage will be better.
>
Just because you have 70 images doesn't necessarily mean you have 70 views. Depending on your needs, you might be able to do this with 70 layers. Layers can be animated, they can be made to appear touchable and draggable even though they are not in fact responders, etc.
However, Rule Three of programming is: don't optimize prematurely. Write the app the simplest possible way (70 views) and see whether there's a problem with that architecture. If there is, worry about it then.
> Im not sure if Im wrong, but the event will be swallowed by the circle view and it will not go to the next UIView bellow it right?... if this is correct how can I make the event go to the UIView bellow the tap when there is/was a UIView on top of it.
I suggest you start by reading the docs. The rules for touch handling, and what settings and tricks you can use to customize it, are pretty thoroughly explained. m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________
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