In each of those methods, you just need to check to see which textfield is targeted, just like you did in textFieldShouldReturn:
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField
{
if (textField == _userNameTextField) {
_userNameTextField.background = [UIImage imageNamed:@"login_field@2x"];
} else if (textField == _passwordTextField) {
_passwordTextField.background = [UIImage imageNamed:@"password_field@2x];
}
return YES;
}