• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get an Specific sublayer of a view.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get an Specific sublayer of a view.


  • Subject: Re: Get an Specific sublayer of a view.
  • From: Matt Long <email@hidden>
  • Date: Wed, 3 Dec 2008 08:30:17 -0700

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 (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

_______________________________________________

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


References: 
 >Get an Specific sublayer of a view. (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: Cant Load an Image into a CALayer
  • Next by Date: Re: Rollover on custom Cells
  • Previous by thread: Get an Specific sublayer of a view.
  • Next by thread: Re: Killing a Thread
  • Index(es):
    • Date
    • Thread