This is most likely a very obvious answer, but I am just not seeing it. I want to open the phone application when I click a button.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://???????"]];
That line of code should do it. The problem is, depending on what happens in the app, I want it to dial a different number. I made a string variable, and I want to put it into the space with the ???
Something like:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://(myPhoneNumberString)"]];
Any ideas?
Thanks
Take a look at the NSString documentation.
Something like that will work:
String format is basically the same as in the
printfC function, with the additional%@format, used to print object representations.