ios - Gesture Recognizer never fires -


this have

uicollectionviewcontroller - uicollectionviewcell - uiscrollview - imageview

i trying handle tap on imageview never called.

uitapgesturerecognizer *tap =[[uitapgesturerecognizer alloc] initwithtarget:self action:@selector(handletap:)]; [cell.imageview addgesturerecognizer:tap];  - (void)handletap:(uitapgesturerecognizer *)recognizer  {     nslog(@"tap");     nsindexpath *indexpath = [self.collectionview indexpathforitematpoint:[recognizer locationinview:self.collectionview]]; } 

cell's imageview should allow user interaction first detect tap. make sure enable user interaction following line.

[cell.imageview setuserinteractionenabled:yes]; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -