1
- (CGFloat)heightForTitleLabel
{
if (self.titleLabel) {
    CGSize size = [self.title sizeWithFont:self.titleLabel.font
                               minFontSize:
#ifndef __IPHONE_6_0
                   self.titleLabel.font.pointSize * self.titleLabel.minimumScaleFactor
#else
                   self.titleLabel.minimumScaleFactor
#endif
                            actualFontSize:nil
                                  forWidth:CONTAINER_WIDTH - CONTENT_PADDING_LEFT * 2
                             lineBreakMode:self.titleLabel.lineBreakMode];
    return size.height;
}
return 0;
}

- (CGFloat)heightForMessageLabel
{
CGFloat minHeight = MESSAGE_MIN_LINE_COUNT * self.messageLabel.font.lineHeight;
if (self.messageLabel) {
    CGFloat maxHeight = MESSAGE_MAX_LINE_COUNT * self.messageLabel.font.lineHeight;
    CGSize size = [self.message sizeWithFont:self.messageLabel.font
                           constrainedToSize:CGSizeMake(CONTAINER_WIDTH - CONTENT_PADDING_LEFT * 2, maxHeight)
                               lineBreakMode:self.messageLabel.lineBreakMode];
    return MAX(minHeight, size.height);
}
return minHeight;
}

Here is my question. I have read other posts about this deprecation in iOS 7, however I can't seem to get them to work for my specific case. Are there any other alternatives for this problem, and any that would work in this situation?

Jude Michael Murphy
  • 1,198
  • 2
  • 12
  • 23

1 Answers1

0
UILabel * label;
label.adjustsFontSizeToFitWidth = YES;
label.minimumScaleFactor = 0.5;
Logan
  • 52,262
  • 20
  • 99
  • 128