I\'d like to change the background image of a UITextField when it becomes the firstResponder to show the user that it has focus, similar to the :active or :focus pseudo-clas
You can probably try observing for changes to isFirstResponder. and changing the background in the notification method. Something like:
[textField addObserver:theObserver forKeyPath:@"isFirstResponder" options:0 context:nil];
Then in the observer:
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
if(object == textField && [keyPath isEqual:@"isFirstResponder"]) {
//fiddle with object here
}
}