iOS打電話的方法

2021-07-13 01:20:15 字數 928 閱讀 3421

1,這種方法,撥打完**回不到原來的應用,會停留在通訊錄裡,而且是直接撥打,不彈出提示

nsmutablestring

* str=[[

nsmutablestring

alloc

] initwithformat

:@"tel:%@"

,@"1234567890"

];2,這種方法,打完**後還會回到原來的程式,也會彈出提示,推薦這種

nsmutablestring

* str=[[

nsmutablestring

alloc

] initwithformat

:@"tel:%@",@"

1234567890"];

uiwebview

* callwebview = [[

uiwebview

alloc

] init

];[callwebview 

loadrequest

:[nsurlrequest

requestwithurl

:[nsurl

urlwithstring

:str]]];

[self

.view

addsubview

:callwebview];

3,這種方法也會回去到原來的程式裡(注意這裡的telprompt),也會彈出提示

nsmutablestring

* str=[[

nsmutablestring

alloc

] initwithformat

:@"telprompt://%@",@"

1234567890"];

[ openurl

:[nsurl

urlwithstring

:str]]

iOS撥打電話

1,這種方法,撥打完 回不到原來的應用,會停留在通訊錄裡,而且是直接撥打,不彈出提示 nsmutablestring str nsmutablestring alloc initwithformat tel 186 x6979 nslog str str 2,這種方法,打完 後還會回到原來的程式,也...

iOS 撥打電話

1.這種方法,撥打完 回不到原來的應用,會停留在通訊錄裡,而且是直接撥打,不彈出提示 nsmutablestring str nsmutablestring alloc initwithformat tel 186 x6979 2.這種方法,打完 後還會回到原來的程式,也會彈出提示,推薦這種 nsm...

最詳細撥打電話方法iOS

本菜鳥看了一些撥打 的方法,不是很完善,故mark乙個完善的,三個方法 方法一 直接撥打 不彈出提示框 可以自己用uiactioncontroller 寫乙個提示框來進行撥打,好處是比方法二的彈出時間短 打完之後回到原程式 ios9.0以上 nsmutablestring str nsmutable...