objective c - How to select object by touch.view and isKindOfClass? -


i've got simple if case in touchesbegan method:

if ([touch.view iskindofclass:[direction class]]) {     //select tapped object , something... } 

i've got on view many direction objects, , when tap on 1 want select it, like:

direction *d = [touch.view].selectedobject; //something that. 

can in obj-c? or how can correctly?

if ([touch.view iskindofclass:[direction class]]) {     //do something...     direction *d = (direction*)[touch view]; } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -