Ho un UITextField con questo NSNotification:testo da UITextFieldTextDidChangeNotification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldDidChange:) name:@"UITextFieldTextDidChangeNotification" object:_searchTextField];
- (void)textFieldDidChange :(NSNotification *)notif
{
//
}
Il NSLog è quando digito 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>>}
Come faccio ad avere il testo r
fuori l'oggetto della notifica?
si dovrebbe usare l'UITextFieldTextDidChangeNotification costante (dichiarata nel UITextField.h) invece di passare il proprio NSString come l'argomento "nome" –