Little suggestion for many many images app, best approach.
Little suggestion for many many images app, best approach.
- Subject: Little suggestion for many many images app, best approach.
- From: Gustavo Pizano <email@hidden>
- Date: Fri, 19 Nov 2010 21:47:34 +0100
Hello everyone.
Im starting a new iPad project, and Im having a dilemma here. WE have develop few apps using cocos2d great library BTW. but for this app Im required to draw 2 concentric circles filled with the area between them, this circle can enlarge or decrease while the user tap-drags inwards or outwards, also the user can drag many items (UIView) which draw an image, this image can be repeated many times, so of course different items draw the same image, from one small view to a big view.
To be short, using cocos I need to use openGL ES to do this, and Im not very skillful with it. So using CoreGraphics I know how to construct my path and fill the area and have the distance between the circles to be constant no matter the size of the whole "view" is.
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.
Now because of my openGL knowledge problem, I may have to instead using cocos2d do it using UIKit, so I was checking some documentation, and saw something similar to an Atlas, and draw part of that big image using the CGImageCreateWithImageInRect .
If each of this items (which will be custom UIViews and which will draw a part of the Big image/Atlas)are UIViews, and in the draw method I draw the proper rect using the CGImageCreateWithImageInRect, then will performance be ok for lets say 70- items? Also, using some logic I can know if the user tapped inside the filled area of the concentric circles or he/she tapped inside the center circle with is not filled (is transparent), then I need to disappear the circles and IF there is an item bellow the tap, then select than item and show the circle centered relative to that item, 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.
Thanks
I hope I did a clear explanation, sorry if I bother somebody with such a questions, I just need to know and be sure Im starting with the right foot if I use UIKit.
ANy comments are welcome
Thanks
Gustavo
_______________________________________________
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