天天看點

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程式

   ……