RTLabel icon indicating copy to clipboard operation
RTLabel copied to clipboard

resizing the RTLabel (eg. when the screen rotates) stretches the text

Open bcyng opened this issue 12 years ago • 1 comments

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; }

bcyng avatar Dec 11 '12 11:12 bcyng

you can call [myRTLabel setNeedsDisplay] to redraw the text after resizing it.

kdaker avatar Dec 19 '12 23:12 kdaker