J'ai utilisé minimumFontSizeavant mais cette fonction est maintenant obsolète et je ne comprends pas très bien comment minimumScaleFactorfonctionne.
Je veux que la taille de police maximale soit 10 et la minimum à 7.
Comment puis-je redimensionner à la taille de police 7 avec le facteur d'échelle?
UILabel création:
UILabel *label = [[UILabel alloc] init];
[label setTranslatesAutoresizingMaskIntoConstraints:NO];
label.text = [labelName uppercaseString];
label.textAlignment = NSTextAlignmentCenter;
label.textColor = [UIColor whiteColor];
label.font = [UIFont fontWithName:HELVETICA_FONT_STYLE_BOLD size:9.5];
label.backgroundColor = [UIColor clearColor];
label.minimumScaleFactor = .1f;
[label addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[label(WIDTH)]"
options:0
metrics:@{@"WIDTH" : [NSNumber numberWithFloat:buttonSize.width]}
views:NSDictionaryOfVariableBindings(label)]];
[contentView addSubview:label];