1
我有以下代碼:主叫電話號碼
phoneNumber = (NSString*)CFBridgingRelease(ABMultiValueCopyValueAtIndex(phones, i));
NSString *phoneNumberURLString = [[NSString alloc] initWithFormat:@"tel://%@", phoneNumber];
NSURL *phoneURL = [[NSURL alloc] initWithString:phoneNumberURLString];
[[UIApplication sharedApplication] openURL:phoneURL];
然而,與此有關的問題是,有時某個電話號碼不會被調用:例如,如果phoneNumber的是(520 )123-1232,那麼這不會撥打電話。任何關於如何標準化電話號碼格式的想法,以便這種方法適用於所有情況?
它只是你指定的數字嗎?哪些號碼不被呼叫? – Jeeter
你在模擬器或設備上運行...看看:http://stackoverflow.com/questions/3282778/make-a-call-from-my-iphone-application?rq=1 – Groot
運行它設備 – aherlambang