views:

90

answers:

2

Hello people,

how can i make a phone call from a textfield that is filled with a telephone number?

greetz Marco

+6  A: 

You should be able to call openURL with a "tel:" protocol. See the Phone Links section of the protocol reference. In 3.x you will see a prompt though in 2.x it will just dial.

slf
A: 

ok. should i have to code an line like this (with initWithString: an then phonenumber)?

NSString *telefonnummer = map.kordinate.telefon;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telefonnummer]];

or another thing? does it automatically dial when i click on the textfield? i hope you can help me again?^^

Marco