Dnlogfunc
Both of these methods can be used
This is said to be AppStore.
nsurl *phoneurl = [nsurl urlwithstring: [nsstring stringwithformat: @ "tel:%@", PhoneNumber]];
if (! _phonecallwebview ) {
_phonecallwebview = [[uiwebview alloc] initwithframe:cgrectzero];
}
[_phonecallwebview loadrequest: [nsurlrequest requestwithurl:p Honeurl];
working with phone numbers
nsstring* soriginphonenum = PhoneNumber;
handle Chinese delimiter-----causes the phone to not be dialed
Nsmutablecharacterset *charset = [[Nsmutablecharacterset alloc] init];
[CharSet Formunionwithcharacterset:[nscharacterset Whitespacecharacterset];
[CharSet Formunionwithcharacterset:[nscharacterset Punctuationcharacterset];
[CharSet Formunionwithcharacterset:[nscharacterset Symbolcharacterset];
Nsarray *arraywithnumbers = [Soriginphonenum componentsseparatedbycharactersinset:charset];
NSString *numberstr = [Arraywithnumbers componentsjoinedbystring:@ ""];
if (!NUMBERSTR) {
Numberstr = @ "";
// }
//
Call the phone number, it is said that the store will be rejected, welcome to share ideas. Telprompt: There are pop-up windows, Tel: no window.
NSString *url = [NSString stringwithformat:@ "telprompt:%@", numberstr];
[[UIApplication sharedapplication] Openurl:[nsurl Urlwithstring:url]];
The iOS app jumps to the phone interface and calls the phone call function