I added TapGestureRecognizer for my self.view:
tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTap:)]; tap.numberOfTapsRequired = 1; tap.numberOfTouchesRequired = 1; [self.view addGestureRecognizer:tap]; [tap release];
The view contains one UIScrollView with images and shortcuts. I want to determine if the user is deleting a shortcut or not.
- (void)singleTap:(UIGestureRecognizer*)gestureRecognizer { CGPoint pt = [gestureRecognizer locationInView:self.view]; UIView *v = [self.view hitTest:pt withEvent:nil]; if ([v isKindOfClass:[UILabel class]]) { NSLog(@"label!"); return; }
However, I do not see the shortcut! in my journal.
user317033
source share