//placeholder颜色字体大小
- (void)drawPlaceholderInRect:(CGRect)rect
{
//CGContextRef context = UIGraphicsGetCurrentContext();
//CGContextSetFillColorWithColor(context, [UIColor yellowColor].CGColor);
[self.placeholder drawInRect:rect withAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:15],NSForegroundColorAttributeName:[TransferColor colorWithHexString:@"949494" ]}];
}
//placeholder位置的改动
-(CGRect)placeholderRectForBounds:(CGRect)bounds
{
return CGRectInset(bounds, 1.5, 4.7);
// CGRect inset = CGRectMake(bounds.origin.x+100, bounds.origin.y, bounds.size.width -10, bounds.size.height);//更好理解些
// return inset;
}
//修改区域的设定
-(CGRect)editingRectForBounds:(CGRect)bounds
{
return CGRectInset(bounds,10.5, 3);
}