iOS - 发短信 打电话 ,打开URL等

来源:互联网 发布:知乎非常了得 编辑:程序博客网 时间:2024/06/01 10:38

//打电话 


[[UIApplication sharedApplication] openURL: [[NSURL alloc] initWithString:[NSString stringWithFormat:@"telephone:%@",@"这里是你要写的电话号码"]]];



//发信息 



[[UIApplication sharedApplication] openURL: [[NSURL alloc] initWithString:[NSString stringWithFormat:@"sms:%@",@"这里是你要写的短信"]]];



//打开URL 


[[UIApplication sharedApplication] openURL: [[NSURL alloc] initWithString:[NSString stringWithFormat:@"url:%@",@"这里是你要写的URL"]]];



1 0
原创粉丝点击