- (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?