怎么监听UICollectionViewCell中的textview输入的数据
展开全部
在tableviewcell中写
if (_recruitModel.recuritDetail.length) {
CGSize textSize=[_recruitModel.recuritDetail boundingRectWithfont:[UIFont systemFontOfSize:15] maxTextSize:CGSizeMake(__gScreenWidth-110, 20000)];
//textViewFrame.size.height=textSize.height+30;
textViewFrame.size.height= textSize.height<24?44:textSize.height+20;
textView.text= _recruitModel.recuritDetail;
}else {
textView.placeholder=model.infoPlaceHolder;
textViewFrame.size.height=44;
textView.text=@"";
}
nameLable.text=lHHSoft(@"k_job_PositionDetail");
textView.frame=textViewFrame;
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (_recruitModel.recruitAddress.length) {
CGSize textSize=[_recruitModel.recruitAddress boundingRectWithfont:[UIFont systemFontOfSize:15] maxTextSize:CGSizeMake(__gScreenWidth-110, 20000)];
return textSize.height<24?44:textSize.height+25;
}else {
return 44;
}
}
if (_recruitModel.recuritDetail.length) {
CGSize textSize=[_recruitModel.recuritDetail boundingRectWithfont:[UIFont systemFontOfSize:15] maxTextSize:CGSizeMake(__gScreenWidth-110, 20000)];
//textViewFrame.size.height=textSize.height+30;
textViewFrame.size.height= textSize.height<24?44:textSize.height+20;
textView.text= _recruitModel.recuritDetail;
}else {
textView.placeholder=model.infoPlaceHolder;
textViewFrame.size.height=44;
textView.text=@"";
}
nameLable.text=lHHSoft(@"k_job_PositionDetail");
textView.frame=textViewFrame;
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (_recruitModel.recruitAddress.length) {
CGSize textSize=[_recruitModel.recruitAddress boundingRectWithfont:[UIFont systemFontOfSize:15] maxTextSize:CGSizeMake(__gScreenWidth-110, 20000)];
return textSize.height<24?44:textSize.height+25;
}else {
return 44;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询