RTLabel
RTLabel copied to clipboard
resizing the RTLabel (eg. when the screen rotates) stretches the text
if you resize the RTLable when the screen rotates, the text gets stretched. this can be reproduced by replacing the textLabel in the DemoTableViewCell.m with the one below (that adds the autoreszing masks then rotate the device when running the demo app). Anyone know how to fix?
- (RTLabel*)textLabel { RTLabel *label = [[RTLabel alloc] initWithFrame:CGRectMake(10,10,300,100)]; //[label setFont:[UIFont fontWithName:@"HelveticaNeue-CondensedBold" size:20]]; [label setParagraphReplacement:@""]; label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleHeight |UIViewAutoresizingFlexibleBottomMargin; return label; }
you can call [myRTLabel setNeedsDisplay]
to redraw the text after resizing it.