2010-11-23 60 views

回答

2
NSString *telephoneNumber = @"+123456789" 
NSURL *target = [[[NSURL alloc] initWithString:[NSString stringWithFormat:@"tel:%@", telephoneNumber]] autorelease]; 
[[UIApplication sharedApplication] openURL:target]; 

你的意思是這樣的情況嗎?

+1

嗨,NR4TR,字符串應該是tel://而不是tel :. NSURL * target = [[[NSURL alloc] initWithString:[NSString stringWithFormat:@「tel://%@」,telephoneNumber]] autorelease];請編輯你的答案。 – Krishnan 2010-11-23 08:27:05