iphone - Cell Imageview with Gesture - Which image was tapped? -


i have uitableview cells displayed image, labeltext , detailtextlabel. cell.imageview configured uitapgesturerecognizer:

uitapgesturerecognizer *tap = [[uitapgesturerecognizer alloc] initwithtarget:self action:@selector(infoimagetapped:)]; [tap setnumberoftapsrequired:1]; [cell.imageview setgesturerecognizers:[nsarray arraywithobject:tap]]; 

the method "infoimagetapped" triggered fine. want know image (to more specific, imagenamed) tapped.

i tried following code:

uiimageview *thetappedimageview = (uiimageview *)tap.view; nslog(@"gesture tag: %@", thetappedimageview.description); 

in nslog-window: imagenamed (*.png) displayed don't know how write information nsstring variable.

i need imagenamed (or reference original image in cell) open alertview image.

thanks in advance florian

-(void)infoimagetapped :(uitapgesturerecognizer *)gesture {     uiimageview *image = (uiimageview *) gesture.view;    nslog(@"gesture tag: %@", image.description);  } 

hope works :)


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -