Matt hi.

Thanks for the reply..

I follow your suggestion and see hoe the app behaves using UIViews only... if 
it doesn't behave as expected then I will use CALayers instead... I just need 
to reread about them  because I know that one case of CALayer doesn't call its 
draw methods,  ooo long time without using them... anyway maybe I don't even 
need to overwrite those methods as Im will set the layer's content form a 
CGImage the its shall be ok. 
> they can be made to appear touchable and draggable even though they are not 
> in fact responders, etc.

I guess you mean using the hitTest: method on the main view's CALayer and see 
the deepest CALLayer under the touch point, then  keep the reference of that 
CALayer and in the moved event move the  reference layer... right? correct me 
if Im wrong please.
> 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.

sure I will give it another read. nevertheless I see this method can come 
handy:  - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event


Thanks for the response,, I will keep you informed of my progress.

Gustavo


On Nov 20, 2010, at 4:15 PM, Matt Neuburg wrote:

> On Fri, 19 Nov 2010 21:47:34 +0100, Gustavo Pizano 
> <gustavxcodepic...@gmail.com> 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 = m...@tidbits.com, <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 (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