0
如何使用目標c將外部鏈接嵌入手機號碼。如何使用外部鏈接嵌入手機號碼
如何使用目標c將外部鏈接嵌入手機號碼。如何使用外部鏈接嵌入手機號碼
NSString *telephoneNumber = @"+123456789"
NSURL *target = [[[NSURL alloc] initWithString:[NSString stringWithFormat:@"tel:%@", telephoneNumber]] autorelease];
[[UIApplication sharedApplication] openURL:target];
你的意思是這樣的情況嗎?
嗨,NR4TR,字符串應該是tel://而不是tel :. NSURL * target = [[[NSURL alloc] initWithString:[NSString stringWithFormat:@「tel://%@」,telephoneNumber]] autorelease];請編輯你的答案。 – Krishnan 2010-11-23 08:27:05