首页 > UITableViewCell 使用 autolayout来调节自身的大小和内部的布局的问题

UITableViewCell 使用 autolayout来调节自身的大小和内部的布局的问题

UITableViewCell 里面包含有一个UITextView。 想根据UITextView的大小来调整UITableViewCell的大小(两者边距一定)。

UITextView 在StoryBoard上应该怎么autoSize?
要怎么设置约束才能让UITextView的autoSize之后的大小影响到UITableViewCell?


使用CGFloat height = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;返回cell的高度
详见http://blog.163.com/china_uv/blog/static/1171372672014111681232340/

【热门文章】
【热门文章】