美文网首页
获取cell默认的高度

获取cell默认的高度

作者: 三岁就很乖 | 来源:发表于2016-11-10 10:33 被阅读16次
1、代码
 CGSize size = [itemCell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
 NSLog(@"ssfsss%f",size.height);
有时还要细算内容的高度。

详解:http://www.cocoachina.com/industry/20140604/8668.html
2、控制台 po 命令 

cell.frame.size.height

相关文章

网友评论

      本文标题:获取cell默认的高度

      本文链接:https://www.haomeiwen.com/subject/mwztpttx.html