调用短信、电话、邮件、Safari浏览器的系统API

//调用短信
- (void)callMsg:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms://135587"]];
}

//调用电话
- (void)callTel:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://135587"]];
}

//调用Safari浏览器
- (void)callSafari:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.baidu.com/"]];
}

// 调用email
- (void)callEmail:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto://test@126.com"]];
}

posted on 2015-03-31 16:39  恒山之阳  阅读(286)  评论(0编辑  收藏  举报

导航