// // GMTextField.m // Gengmei // // Created by wangyang on 1/23/15. // Copyright (c) 2015 Wanmeichuangyi. All rights reserved. // #import "GMTextField.h" @implementation GMTextField - (instancetype)initWithCoder:(NSCoder *)coder { self = [super initWithCoder:coder]; if (self) { [self setup]; } return self; } - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self setup]; } return self; } - (void)setup { } - (CGRect)textRectForBounds:(CGRect)bounds{ CGRect rect = [super textRectForBounds:bounds]; return UIEdgeInsetsInsetRect(rect, UIEdgeInsetsMake(3, 8, 0, 8)); } - (CGRect)placeholderRectForBounds:(CGRect)bounds{ return [self textRectForBounds:bounds]; } - (CGRect)editingRectForBounds:(CGRect)bounds{ return [self textRectForBounds:bounds]; } @end