Skip to content

Instantly share code, notes, and snippets.

@threeve
Created April 7, 2011 03:02
Show Gist options
  • Save threeve/906948 to your computer and use it in GitHub Desktop.
Save threeve/906948 to your computer and use it in GitHub Desktop.
UILabel subclass with text aligned at top
#import <UIKit/UIKit.h>
@interface RATopAlignedLabel : UILabel
@end
@implementation RATopAlignedLabel
- (void) drawTextInRect:(CGRect)rect;
{
[self.textColor setFill];
[self.text drawInRect:rect withFont:self.font lineBreakMode:self.lineBreakMode alignment:self.textAlignment];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment