【发布时间】:2011-07-09 09:07:23
【问题描述】:
enter code here-(IBAction)Call:(id)sender{
//[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://18005551234"]];
/*NSString *phoneStr = [[NSString alloc] initWithFormat:@"tel:%@",phoneNumber.text];
NSURL *phoneURL = [[NSURL alloc] initWithString:phoneStr];
[[UIApplication sharedApplication] openURL:phoneURL];
[phoneURL release];
[phoneStr release];*/
NSURL *url = [ [ NSURL alloc ] initWithString: @"tel:212-555-1234" ];
[[UIApplication sharedApplication] openURL:url];
} 在上面的代码中,我使用了各种方法,但没有人工作。当我在函数上实现断点时,它说这超出了范围。这有什么问题?
【问题讨论】:
标签: ios objective-c uibutton phone-call