Sportica   Sportica

iOS 实现打电话

//1、系统的打电话代码,不返回当前程序:  
  
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://10086"]];    
  
//2、用UIWebView来实现,打电话结束后会返回当前应用程序:  
  
UIWebView *callPhoneWebVw = [[UIWebView alloc] init];    
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"tel://10086"]];    
[callPhoneWebVw loadRequest:request];    
posted @ 2012-10-31 14:05  qingjoin  阅读(254)  评论(0编辑  收藏  举报
  Sportica