首先在手機串號刪除#如果真的沒關係做出以下
NSString *[email protected]"18005333333,,,1#,,,421#,,,959538788";
NSString *phonenumberstring = [phoneString stringByReplacingOccurrencesOfString:@"#" withString:@""];
NSURL *phoneUrl = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",[phonenumberstring stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]];
if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
[[UIApplication sharedApplication] openURL:phoneUrl];
} else {
UIAlertView *noAccess=[[UIAlertView alloc] initWithTitle:@"Title" message:@"Your device doesn't support this feature." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[noAccess show];
}
電話call.like(OR )
NSURL *telURL = [NSURL URLWithString:@"tel:18005333333,,,1#,,,421#,,,959538788"];
[callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];
希望它有助於喲ü...
它是完美的。謝謝肯·托馬斯 – 2014-12-06 15:48:09