2011-02-07 36 views
0

我打電話使用UIWebview,它給我一個「取消」和「呼叫」的警報我想處理「呼叫」和「取消」Btns,如果我按「呼叫」我我能打電話,如果我解僱它回來我的應用程序的調用,請幫我在處理「呼叫」和「取消」 Btns使用UIWebview調用電話

UIWebview *webview = [[UIWebView alloc] initWithFrame:[UIScreen Screen].applicationFrame]; 

[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",newNumber]]]]; 

非常感謝!

+0

http://www.iphonedevsdk.com/forum/iphone-sdk-development/24098-uialertview-button-trigger-events.html – Mahesh 2011-02-07 09:57:32

回答

1

這是應用程序的默認行爲。

[[UIApplication sharedApplication]openURL:[NSURL URLWithString:[number stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]; 

UIWebView *callWebview = [[UIWebView alloc] init]; 
NSURL *telURL = [NSURL URLWithString:]; 
[callWebview loadRequest:[NSURLRequest requestWithURL:telURL]]; 

看到其中的差別。