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
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
网友评论