self.textView =[ [UITextView alloc]init];
self.textView.backgroundColor=hs
self.textView.delegate = self;
self.textView.layer.borderWidth = 1.0;//边宽
self.textView.layer.cornerRadius = 5.0;//设置圆角
[cell addSubview:self.textView];
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(beizhu.mas_bottom).offset(5);
make.left.mas_equalTo(20);
make.right.mas_equalTo(-20);
make.bottom.mas_equalTo(-15);
make.width.mas_equalTo(200);
}];
//再创建个可以放置默认字的lable
self.placeHolderLabel = [[UILabel alloc]init];
self.placeHolderLabel.text = @"对货主我还有一些话要说";
self.placeHolderLabel.textColor=[UIColor lightGrayColor];
self.placeHolderLabel.backgroundColor =[UIColor clearColor];
ios 监听TextView输入文本长度
最新推荐文章于 2024-05-15 14:59:40 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)