Skip to content

Instantly share code, notes, and snippets.

@koromiko
Created January 2, 2014 10:20
Show Gist options
  • Save koromiko/8217320 to your computer and use it in GitHub Desktop.
Save koromiko/8217320 to your computer and use it in GitHub Desktop.
detect touch event
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
CGPoint touchPoint = [touch locationInView:self];
/* if touch point inside the konogram image */
if(CGRectContainsPoint(self.magCoverImageView.frame, touchPoint)){
if(self.delegate!=nil && [self.delegate respondsToSelector:@selector(didClickOnImageForNewIssueCell:)]){
[self.delegate didClickOnImageForNewIssueCell:self];
}
}
[super touchesEnded:touches withEvent:event];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment