Reputation: 1054
Is it possible to make an app that will work like this:
The app will have a text field and a button.
In the textfield the user types in the phone number.
When the user is done typing in the phone number the user hits the button which will open the Phone app and call that number.
Upvotes: 0
Views: 640
Reputation: 54425
Yes, this is possible. You'd set up the text field and button as per usual and have the action associated with the button extract the text from the UITextField using the "text" property. You can then use the "tel://" URL handler to make a call, although this will bring up a dialog asking the user to confirm:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://xxxx"]];
Upvotes: 2