天天看点

iOS UIApplication功能十分强大的openURL方法

UIApplication *app = [UIApplication shareApplication];

1>.打电话

        [app openURL:[NSURL URLWithString:@"tel://10086"]];

2>.发短信

       [app openURL:[NSURL URLWithString:@"sms://10086"]];

3>.发邮件

     [app openURL:[NSURL URLWithString:@"mailto://****@qq.com"]];

4>.打开一个网页

    [app openURL:[NSURL URLWithString:@"http://www.baidu.com"]];

5>.打开其他app程序

   ……