Skip to content

Instantly share code, notes, and snippets.

@anthonyherron
Created October 10, 2011 18:43
Show Gist options
  • Save anthonyherron/1276141 to your computer and use it in GitHub Desktop.
Save anthonyherron/1276141 to your computer and use it in GitHub Desktop.
Subclass UILabel and add below to start drawing text at exactly origin 0.0,0.0 (x,y)
-(void) drawTextInRect:(CGRect)inFrame
{
CGRect draw = [self textRectForBounds:inFrame limitedToNumberOfLines:[self numberOfLines]];
draw.origin = CGPointZero;
[super drawTextInRect:draw];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment