自定义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;

}

你可能感兴趣的:(自定义PlaceHolderTextView继承UITextView,解决placeholder问题)