Skip to content

Instantly share code, notes, and snippets.

@hhyyy9
Created September 29, 2012 01:39
Show Gist options
  • Save hhyyy9/3802869 to your computer and use it in GitHub Desktop.
Save hhyyy9/3802869 to your computer and use it in GitHub Desktop.
当开始输入文字以及完成文字输入时,变换text field的背景。
-(BOOL) textFieldShouldBeginEditing:(UITextField *)textField{
[textField setBackground:[UIImage imageNamed:@"ctext_field_02.png"]];
return YES;
}
-(void) textFieldDidEndEditing:(UITextField *)textField{
[textField setBackground:[UIImage imageNamed:@"ctext_field_01.png"]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment