•UIApplication有个功能十分强大的openURL:方法
-(BOOL)openURL:(NSURL*)url;
-
•openURL:方法的部分功能有
Ø打电话
UIApplication *app= [UIApplicationsharedApplication];
[app openURL:[NSURLURLWithString:@"tel://10086"]];
Ø发短信
[app openURL:[NSURLURLWithString:@"sms://10086"]];
Ø发邮件
[app openURL:[NSURLURLWithString:@"mailto://12345@qq.com"]];
Ø打开一个网页资源
[app openURL:[NSURLURLWithString:@"http://ios.itcast.cn"]];
Ø打开其他app程序