怎麼在程序中使用代碼調用iphone打電話功能

郵件
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto://[email protected]"]];
電話
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8004664411"]];
sms

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms://466453"]];

瀏覽器

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunesconnect.apple.com"]]; 


打完電話回不去的話,就用@"telprompt://123456"就好了。 


模擬器不支持電話,短信和app store 


原帖地址:http://www.cocoachina.com/bbs/read.php?tid-15849-page-1.html


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章