美文网首页
iOS cell高度

iOS cell高度

作者: 夏天爱西瓜汁 | 来源:发表于2017-11-28 11:17 被阅读11次

2016.12.23

ScanInfo*scan =self.viewModel.scanHistoryArr[indexPath.section];

CGFloatwidth =SCREEN_WIDTH-30-58;//距左右各15

UIFont*font = [UIFontsystemFontOfSize:12];

NSAttributedString*string = [[NSAttributedStringalloc]initWithString:[

scan.deviceLocationattributes:@{NSFontAttributeName:font}];

CGRectrect = [stringboundingRectWithSize:CGSizeMake(width,CGFLOAT_MAX)options:NSStringDrawingUsesLineFragmentOrigincontext:nil];

CGSizesize = rect.size;

returnsize.height+51;//+ 8+14.5+3.5+3.5+14.5+8;

相关文章

网友评论

      本文标题:iOS cell高度

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