标签:tostring touch事件 family pre ring tableview art action 屏幕
//加入手势,点击屏幕其它区域关闭键盘操作 UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(SEL)]; gesture.numberOfTapsRequired = 1; gesture.delegate = self; [self.view addGestureRecognizer:gesture];
#pragma mark - UIGestureRecognizerDelegate - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { // 若为UITableViewCellContentView(即点击了tableViewCell),则不截获Touch事件 if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) { return NO; } return YES; }
标签:tostring touch事件 family pre ring tableview art action 屏幕
原文地址:http://www.cnblogs.com/wgwyanfs/p/6753351.html