2010-02-10 8 views

Répondre

6

Vous devriez pouvoir appeler le openURL avec un protocole "tel:". Voir la section Phone Links de la référence de protocole. Dans 3.x vous verrez une invite mais dans 2.x il suffit de composer.

+0

ok. devrais-je coder une ligne comme celle-ci (avec initWithString: an then phonenumber)? NSString * telefonnummer = map.kordinate.telefon; \t [[UIApplication sharedApplication] openURL: [NSURL URLWithString: telefonnummer]]; \t ou autre chose? est-ce qu'il compose automatiquement quand je clique sur le champ de texte? J'espère que vous pouvez m'aider à nouveau? ^^ – Marco

+0

Si je comprends bien vos questions, oui, oui, et peut-être? – slf

2
NSString *callTextFiel = [NSString StringWithFormat:@"tel:%@", textField.text]; 

[[UIApplication SharedApplication] openURL:[NSURL URLWithString:callTextField]]; 
Questions connexes