I'm drawing a bingo card (UIView) with 27 squares: 9 columns x 3 lines. Cards can have 3 different sizes, so they must be resizable. And inside the card, every square with a number is an UIView with a custom class. Inside the view (in the .xib file) there is the UILabel, where the number is set with:
[lblNumber setText: [NSString stringWithFormat:((number < 10) ? @" %i" : @"%i"), number]];
When numbers have two digits (10->90) everything looks great inside the squares, but for numbers from 1 to 9, label displays with a bigger font size than the others because it only has 1 digit. Ok, I tried to uncheck the "Adjust to fit" setting, but then font size remains small. Autosizing setting开发者_高级运维s of the label are set to both arrows, so the label has "space" to resize.
¿How can I have single digit numbers to resize the exact proportion than numbers with two digits? As you can see in the line of code, I also tried to concatenate a space for numbers with one digit.
Thanks in advance.
精彩评论