#import "XMGLoginRegisterTextField.h"

#import <objc/runtime.h>


@implementation XMGLoginRegisterTextField


- (void)awakeFromNib

{

    // 设置光标颜色

    self.tintColor = [UIColor whiteColor];

    

    // 默认行为

    [self resignFirstResponder];

}


/**

 *  正在编辑

 */

- (BOOL)becomeFirstResponder

{

    [self setValue:[UIColor whiteColor] forKeyPath:XMGTextFieldPlaceholderColor];

    

    return [super becomeFirstResponder];

}


/**

 * 结束编辑

 */

- (BOOL)resignFirstResponder

{

    [self setValue:[UIColor grayColor] forKeyPath:XMGTextFieldPlaceholderColor];

    

    return [super resignFirstResponder];

}

@end