自定义PlaceHolderTextView继承UITextView,解决placeholder问题

- (PlaceHolderTextView *)textView{

if (!_textView ) {

_textView = [[PlaceHolderTextView alloc]initWithFrame:CGRectMake(LineX(10), LineY(10), WIDTH-20, LineY(60))];

_textView.backgroundColor = ZITIWHITECOLOR;

_textView.textColor = ZITIGRAYCOLOR;

_textView.font = [UIFont systemFontOfSize:13];

_textView.placeholder = @"请输入详细内容并上传清晰的照片,才有可能获得你想要的!";

_textView.returnKeyType = UIReturnKeyDone;

_textView.showsVerticalScrollIndicator = NO;

_textView.showsHorizontalScrollIndicator = NO;

_textView.tag = 152;

}

return _textView;

}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容