计算高度

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

 NSString *text = JudgeString([self.shipDic objectForKey:@"address"]);
    if (text.length == 0) {
        text =@"   ";
    }
    self.labelConSigneeAddress.text =text;
    CGFloat width = CGRectGetWidth(self.labelConSigneeAddress.frame);
    CGSize maxSize = CGSizeMake(width, MAXFLOAT);
    CGSize size = MULTILINE_TEXTSIZE(text, [UIFont systemFontOfSize:13], maxSize, NSLineBreakByWordWrapping);
    self.labelConSigneeAddress.text =text;
    self.headerView.frame = CGRectMake(0, 0, CGRectGetWidth([UIScreen mainScreen].bounds), 220+size.height) ;
    self.orderDetaulsTableView.tableHeaderView = self.headerView;