
Untitled
By: a guest on
Jul 20th, 2012 | syntax:
None | size: 0.57 KB | hits: 12 | expires: Never
UITapGestureRecognizer doesn't fire up on UIView Subclass
MyCustomView *customView = [[MyCustomView alloc] initWithFrame:CGRectFrame(0, 30, 30, 30)];
[customView setUserInteractionEnabled:YES];
UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doSomething)];
[customView addGestureRecognizer:tapGestureRecognizer];
UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doSomething:)];
-(void) doSomething:(UITapGestureRecognizer *)gesture;