You get the point from the view and then do a hitTest on the root layer. It returns a pointer to the layer you clicked on.

http://developer.apple.com/DOCUMENTATION/GraphicsImaging/Reference/CALayer_class/Introduction/Introduction.html#/ /apple_ref/occ/instm/CALayer/hitTest:

-Matt


On Dec 3, 2008, at 3:54 AM, Gustavo Pizano wrote:

Hello , well I dunno if this message will arrive to you guys, I have place 2 but got no answer, anyway with those 2 I managed to solve the problem.

I have a view which has 5 sub-layers, 6 in total with 1st layer which contains the other 5. Now I want to make a drag and drop operation, each of the 5 layers mentioned above contains an image, so I want to drag that image in another view of the app, so how can I get the exact layer im clicking on?, should I make some if-else statements to know where the mouse was clicked and see which layers has those points or is there any simple workaround to achieve this goal.

Thanks a lot,.

Best regards


Gustavo

_______________________________________________

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/matt.long%40matthew-long.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to