I have a custom complex UITableViewCell where there are many views. I have an UIImageView within it which is visible for a specific condition. When it\'s visible ,
Maybe not the ideal solution, but add tags to each of the UIImageViews. Then have an NSArray with the uid's corresponding to the tag values
So somewhere in your code make the array
NSArray *testArray = [NSArray arrayWithObjects:@"uid1", @"uid2", @"uid3", @"uid4", @"uid5", @"uid6", nil];
Then when you're setting up the tableview cells set the tag to the row #
//Set the tag of the imageview to be equal to the row number
cell.imageView.tag = indexPath.row;
//Sets up taprecognizer for each imageview
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(handleTap:)];
[cell.imageView addGestureRecognizer:tap];
//Enable the image to be clicked
cell.imageView.userInteractionEnabled = YES;
Then in the method that gets called you can get the tag like this
- (void)handleTap:(UITapGestureRecognizer *)recognizer
{
NSString *uid = testArray[recognizer.view.tag];
}