tapGestureRecognizer.cancelsTouchesInView = NO;
在手势初始化的时候加上这句就行了。
或者用UIControl替换当前的self.view,代码如下:
UIControl *control = [[UIControl alloc] initWithFrame:self.view.frame]; [control addTarget:self action:@selector(controlTapped) forControlEvents:UIControlEventTouchUpInside]; self.view = control; [control release];