iOS 撥打電話

2021-07-13 14:39:39 字數 717 閱讀 8524

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

nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@"tel:%@",@"186***x6979"];
2.這種方法,打完**後還會回到原來的程式,也會彈出提示,推薦這種

nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@"tel:%@",@"186***x6979"];

uiwebview * callwebview = [[uiwebview alloc] init];

[callwebview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:str]]];

[self

.view addsubview:callwebview];

[callwebview release];

[str release];

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

nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@"telprompt://%@",@"186***x6979"];

iOS撥打電話

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

iOS程式撥打電話

三種方法,各有不同,拿來給大家分享,希望給大家有所幫助 1,這種方法,撥打完 回不到原來的應用,會停留在通訊錄裡,而且是直接撥打,不彈出提示 nsmutablestring str nsmutablestring alloc initwithformat tel 186 x6979 nslog st...

iOS開發 撥打電話總結

關於ios應用撥打 我所知道的有3種辦法,具體如下 特點 直接撥打,不彈出提示。並且,撥打完以後,留在通訊錄中,不返回到原來的應用。撥打 void callphone nsstring phonenumber 特點 撥打前彈出提示。並且,撥打完以後會回到原來的應用。撥打 void callphone...