代码备忘:
1、点击空白处,收起键盘
UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyBoard)];
tapGestureRecognizer.cancelsTouchesInView = NO;
[self.tableView addGestureRecognizer:tapGestureRecognizer];
- (void)hideKeyBoard {
[self.textField endEditing:YES];
}
2、拨打电话
NSString *phoneStr = @"telprompt:400-8888888";
NSURL *url =[NSURL URLWithString:phoneStr];
[[UIApplication sharedApplication] openURL:url];
网友评论