openURL方法的使用

openURL方法常用有

1:打开网页:

[[UIApplication sharedApplication]openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.hao123.com"]]];

2:给XXX号码打电话:

[[UIApplication sharedApplication]openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:XXX"]]];

3:给XXX号码发信息:

[[UIApplication sharedApplication]openURL:[NSURL URLWithString:[NSString stringWithFormat:@"sms:XXX"]]];

3:打开其他app:

[[UIApplication sharedApplication]openURL:[NSURL URLWithString:[NSString stringWithFormat:@"taobao:参数"]]];

推荐阅读更多精彩内容