2012-08-02 12 views

Respuesta

17

que debe estar bien con algo como (suponiendo que el campo de texto es una vista secundaria de self.view):

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

@Thanx Bruno se está trabajando –

3

uso:

UITextField *textField = (UITextField*)[self.view viewWithTag:100]; 

NSLog(@"%@",textField.text); 

Es necesario sustituir el 100 por su propia etiqueta.

+0

gracias se está trabajando –

+0

@JaspreetSingh: con el placer –

4

Try debajo de uno

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

@thanx Kamarshad –

+0

@JaspreetSingh le dan la bienvenida .. !!! – Kamarshad

Cuestiones relacionadas