3種撥打電話的方式

2021-06-26 13:21:19 字數 729 閱讀 8463

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

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

//            nslog(@"str*****=%@",str);

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];

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

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

//            nslog(@"str*****=%@",str);

3種撥打電話的方式

小弟查了很多地方的關於ios程式撥打 大都不全,今天我總結了三種方法,各有不同,拿來給大家分享,希望給大家有所幫助 1,這種方法,撥打完 回不到原來的應用,會停留在通訊錄裡,而且是直接撥打,不彈出提示 nsmutablestring str nsmutablestring alloc initwit...

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...