-(void)fitFontSize:(UILabel*)label {
CGFloat actualFontSize;
[label.text sizeWithFont:label.font
minFontSize:label.minimumFontSize
actualFontSize:&actualFontSize
forWidth:label.bounds.size.width
lineBreakMode:label.lineBreakMode];
label.font = [label.font fontWithSize:actualFontSize];
label.adjustsFontSizeToFitWidth = NO;
}
usage: self.keyLabel = [self makeLabel:[UIFont fontWithName:@”AkzidenzGroteskBE-BoldCn” size:45.0f]];
self.keyLabel.frame = CGRectMake(0, 0, self.cellWidth / 4.0, self.cellHeight);
self.keyLabel.text = @"C";
[self fitFontSize:self.keyLabel];
[self.keyLabel sizeToFit];
[self.keyLabel makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.centerX);
make.centerY.equalTo(self.centerY);
}];