6
votes

Comment puis-je obtenir la valeur de TextField de la balise dans iPhone SDK?

Si j'ai une balise de champ de texte, comment puis-je choisir la valeur de TextField dans iPhone SDK


0 commentaires

4 Réponses :


17
votes

Vous devriez aller bien avec quelque chose comme (en supposant que le Textfield est une SUBVIEW de Self.View):

NSString *text = [(UITextField *)[self.view viewWithTag:THE_TAG] text];


0 commentaires

3
votes

Utilisation: xxx

Vous devez remplacer 100 par votre propre balise.


1 commentaires

@Jaspreetsingh: avec plaisir



5
votes

Essayez ci-dessous un

UITextField *textField = (UITextField*)[self.view viewWithTag:tag_Number];
NSString* textString=[textField text];
//Use textString  further


0 commentaires

5
votes

nsstring * texte = [(Uitextfield *) [Self.View ViewWithTag: Tag] Texte];


0 commentaires