iOS 撥打電話三種方式

2021-07-12 02:30:16 字數 725 閱讀 1323

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 str str 2,這種方法,打完 後還會回到原來的程式,也...

iOS 撥打電話三種方式總結

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