I have tried setting up a simple UITapGestureRecognizer on a UILabel but it is not working. Nothing seems to be recognized and nothing is written to the log.
in a method called from viewDidLoad
UILabel *miTN = [[UILabel alloc] initWithFrame:CGRectMake(300, 100, 150, 15)];
[miTN setUserInteractionEnabled:YES];
UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecognized)];
[miTN addGestureRecognizer: tapRecognizer];
[miView addSubview:miTN];
... later
- (void)tapRecognized:(id)sender
{
NSLog(@"that tap was recognized");
}
Also, this is called in response to an async network call. Could that be causing the problem? Is there some other issue that might be causing isssue? I'm not really sure what first step to debug would be - I checked Color Blended Layers to see if they were ovrelapping but don't appear to be.