设置文本字体大小

   CGSize maxSize = CGSizeMake(ScreenW, MAXFLOAT); //设置一个行高上限

    NSDictionary *attribute = @{NSFontAttributeName:self.subtitleLabel.font};

    CGSize subtitleSize = [self.item.subtitle boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:attribute context:nil].size;

转载于:https://www.cnblogs.com/fengkuangIT/p/4875127.html

你可能感兴趣的:(设置文本字体大小)