Objective-C UITextField首行缩进的问题

#import 

@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


你可能感兴趣的:(Objective-C UITextField首行缩进的问题)