我閱讀有關如何進行呼叫程序在iPhone上的一些參考,讓我把這個在我的代碼:撥打號碼
UIApplication *app = [UIApplication sharedApplication];
NSString *urlString = [NSString stringWithFormat:@"tel:0225225657"];
NSURL *url = [NSURL URLWithString:urlString];
[app openURL:url];
是正確的? 如果是,我怎麼能知道我的應用程序已經撥打了這個號碼,而我在模擬器中運行這個?
你試過了嗎?這似乎是可以輕鬆測試的東西... – 2010-08-25 05:37:25
是的,我試過了..但沒有發生 – 2010-08-25 05:38:04
代碼是否被執行?嘗試添加一個斷點或NSLog。 – 2010-08-25 05:58:38