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