Skip to content
This repository has been archived by the owner on Nov 1, 2017. It is now read-only.

Commit

Permalink
fixed a bug in the vertical positioning property
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed Oct 8, 2011
1 parent 396591b commit c9184c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/UIKit/TUITextRenderer.m
Expand Up @@ -81,9 +81,9 @@ - (void)_buildFrame

CGSize size = AB_CTFrameGetSize(_ct_frame);
if(verticalAlignment == TUITextVerticalAlignmentMiddle) {
effectiveFrame.origin.y -= size.height / 2;
effectiveFrame.origin.y = size.height/2 - frame.size.height/2;
} else if(verticalAlignment == TUITextVerticalAlignmentBottom) {
effectiveFrame.origin.y -= size.height;
effectiveFrame.origin.y = size.height;
}

effectiveFrame = CGRectIntegral(effectiveFrame);
Expand Down

0 comments on commit c9184c8

Please sign in to comment.