Tengo una UITextField con este NSNotification:texto de UITextFieldTextDidChangeNotification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldDidChange:) name:@"UITextFieldTextDidChangeNotification" object:_searchTextField];
- (void)textFieldDidChange :(NSNotification *)notif
{
//
}
El NSLog es cuando escribo en r
NSConcreteNotification 0x193c20 {name = UITextFieldTextDidChangeNotification; object = <UITextField: 0x15a980; frame = (20 20; 280 31); text = 'r'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x15aad0>>}
¿Cómo consigo el texto r
fuera del objeto entr?
Se debe utilizar la UITextFieldTextDidChangeNotification constante (declarada en UITextField.h) en lugar de pasar su propio NSString como el argumento "nombre" –