改变textField的placeholder的颜色和位置

重写UItextField的这个方法,用其他的textField继承自这个父类

- (void) drawPlaceholderInRect:(CGRect)rect {  

    [[UIColor blueColor] setFill];  

    [self.placeholder drawInRect:rect withFont:self.font lineBreakMode:UILineBreakModeTailTruncation alignment:self.textAlignment];  

posted @ 2015-11-20 15:24  _Ace  阅读(292)  评论(0编辑  收藏  举报