#import <UIKit/UIKit.h>
@interface KHRecordTextField : UITextField
@end
#import "KHRecordTextField.h"
@implementation KHRecordTextField
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0.0, 0.0, 6.0, self.frame.size.height)];//左端缩进5像素
self.leftView = view;
self.leftViewMode =
UITextFieldViewModeAlways;
}
return self;
}
@end