#pragma mark -
#pragma mark UITextFieldDelegate
//控制键盘跳转
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
if(textField == _txtAccount) {
if([_txtAccount.text length]==0) {
returnNO;
}
[_txtPasswordbecomeFirstResponder];
}else if (textField == _txtPassword) {
[_txtPasswordresignFirstResponder];
}
returnYES;
}
//输入框背景更换
-(BOOL) textFieldShouldBeginEditing:(UITextField*)textField{
[textFieldsetBackground:[UIImageimageNamed:@"ctext_field_02.png"]];
returnYES;
}
-(void) textFieldDidEndEditing:(UITextField*)textField{
[textFieldsetBackground:[UIImageimageNamed:@"ctext_field_01.png"]];