#import <UIKit/UIKit.h>
typedef void(^DoneActionBlock)(id);
@interface CustomeTextField : UITextField
@property(nonatomic,retain) UIButton* doneButton;
@property(nonatomic,retain) NSString* buttonTitle;
@property(nonatomic,copy) DoneActionBlock doneEven;
@end
#import "CustomeTextField.h"
@implementation CustomeTextField
@synthesize doneButton,buttonTitle,doneEven;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
// 注册UIKeyboardDidShowNotification通知的观察者为self
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addOb