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;