UITextView

 _textView = [[UITextView alloc]init];

        _textView.backgroundColor = [UIColor whiteColor];

        _textView.delegate = self;

        [cell.contentView addSubview:_textView];

        [_textView mas_makeConstraints:^(MASConstraintMaker *make) {

            make.edges.mas_equalTo(0);

        }];

        _placeholdeView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"bottlefive.png"]];

        [cell.contentView addSubview:_placeholdeView];

        [_placeholdeView mas_makeConstraints:^(MASConstraintMaker *make) {

            make.left.mas_equalTo(10);

            make.bottom.mas_equalTo(-10);

            make.size.mas_equalTo(CGSizeMake(282/3, 282/3));

        }];

        _addView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dgn-gr-grz-bj3@3x.png"]];

        [_addView addTapGestureRecognizerWith:self action:@selector(clickaddView:)];

        [cell.contentView addSubview:_addView];

        [_addView mas_makeConstraints:^(MASConstraintMaker *make) {

            make.left.mas_equalTo(_placeholdeView.mas_right).offset(10);

            make.bottom.mas_equalTo(-10);

        }];


   _placeholerLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 40)];

        _placeholerLabel.textAlignment = NSTextAlignmentLeft;

        _placeholerLabel.font = [UIFont systemFontOfSize:14];

        _placeholerLabel.text = @"请输入内容";

        [_textView addSubview:_placeholerLabel];



-(void)textViewDidChange:(UITextView *)textView{

    if (textView.text.length ==0) {

        _placeholerLabel.text = @"请输入内容";

    }

    else{

        _placeholerLabel.text=@"";

    }

}





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值