Skip to content

Commit

Permalink
Merge pull request #374 from mmorearty/patch-vertical-text-alignment
Browse files Browse the repository at this point in the history
Fix issue 351: Vertical text alignment
  • Loading branch information
jverkoey committed Oct 1, 2013
2 parents 10549e0 + 531c75d commit fd4d255
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/attributedlabel/src/NIAttributedLabel.m
Expand Up @@ -1411,6 +1411,7 @@ - (void)drawAttributedString:(NSAttributedString *)attributedString rect:(CGRect

for (CFIndex lineIndex = 0; lineIndex < numberOfLines; lineIndex++) {
CGPoint lineOrigin = lineOrigins[lineIndex];
lineOrigin.y -= rect.origin.y; // adjust for verticalTextAlignment
CGContextSetTextPosition(ctx, lineOrigin.x, lineOrigin.y);
CTLineRef line = CFArrayGetValueAtIndex(lines, lineIndex);

Expand Down

0 comments on commit fd4d255

Please sign in to comment.