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
Post a Comment