You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I want is if the word is large like "spectacular" then it should adjust the size of the font automatically but it doesn't. It just chops off the word. How can I fix that? By the way really nice with THLabel.
Or I get this for labelValue4.text = @"Partly Cloudy";
dot dot dot
The text was updated successfully, but these errors were encountered:
This is definitively a known issue. THLabel is using Core Text for drawing and I'm not aware of a simple solution like UILabel's adjustsFontSizeToFitWidth or minimumScaleFactor. Also numberOfLines is being ignored by THLabel. I'll look into this issue again, but I couldn't find anything the last time. The solution for now is probably to set a fixed lower font size.
I have defined a THLabel programmatically as follows.
THLabel *labelValue4 = [[THLabel alloc] initWithFrame:CGRectMake(20,269,300,85)];
labelValue4.text = @"Spectacular";
labelValue4.font = [UIFont fontWithName:@"Arial Rounded MT Bold" size: 57.0];
labelValue4.textColor = [UIColor colorWithRed:52/255.f green:152/255.f blue:255/255.f alpha:1.0];
labelValue4.textAlignment = NSTextAlignmentLeft;
labelValue4.numberOfLines = 1;
labelValue4.backgroundColor = [UIColor clearColor];
labelValue4.strokeColor = [UIColor blackColor];
labelValue4.strokeSize = 1.0;
[self.view addSubview:labelValue4];
What I want is if the word is large like "spectacular" then it should adjust the size of the font automatically but it doesn't. It just chops off the word. How can I fix that? By the way really nice with THLabel.
Or I get this for labelValue4.text = @"Partly Cloudy";
dot dot dot
The text was updated successfully, but these errors were encountered: