I have this code, creating simple UILabel with some text and default font
self.reviewCountLabel = [[UILabel alloc] initWithFrame:someFrame];
self.reviewCountLabel.text = @"1231 REVIEWS";
self.reviewCountLabel.textAlignment = NSTextAlignmentRight;
self.reviewCountLabel.backgroundColor = [UIColor lightGrayColor];
// self.reviewCountLabel.font = [UIFont fontWithName:kSTGFontAvantGardeBold size:18];
[self addSubview:self.reviewCountLabel];
On the screen I get this:
BUT if I uncomment code which add custom font I will get this:
Can someone explain why I have vertical alignment to top here? (or help to solve it)