iOS 撥打電話三種方式總結

2021-09-07 06:25:14 字數 787 閱讀 2044

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

[callwebview release];

[str release];

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

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

//            nslog(@"str*****=%@",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 nslog str str 2,這種方法,打完 後還會回到原來的程式,也...

iOS 撥打電話三種方式總結

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