Im observing a bigger down size of my text when using .adjustsFontSizeToFitWidth on iOS15 vz iOS14 Xcode 13 but i haven't find any release notes explaining why.
My observations are this: Same frame for the label result on a different text size in a proportion of heiht: 1, width:4
even more stranger if I increase the height of the frame the behavior returns to be like the old one and this don't affect behavior on iOS14
// First label is render smaller on iOS 15 vz 14
UILabel *yourLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 100, 160, 40)];
[yourLabel1 setTextColor:[UIColor brownColor]];
[yourLabel1 setBackgroundColor:[UIColor systemRedColor]];
[yourLabel1 setFont:[UIFont boldSystemFontOfSize:52]];
[yourLabel1 setText:@"HELLO"];
yourLabel1.minimumScaleFactor = 0.2;
yourLabel1.adjustsFontSizeToFitWidth = YES;
[self.view addSubview:yourLabel1];
// Second label is render equal on iOS 15 and 14 only difference is a change on the height
UILabel *yourLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(0, 300, 160, 60)];
[yourLabel2 setTextColor:[UIColor brownColor]];
[yourLabel2 setBackgroundColor:[UIColor systemRedColor]];
[yourLabel2 setFont:[UIFont boldSystemFontOfSize:52]];
[yourLabel2 setText:@"HELLO"];
yourLabel2.minimumScaleFactor = 0.2;
yourLabel2.adjustsFontSizeToFitWidth = YES;
[self.view addSubview:yourLabel2];
Post
Replies
Boosts
Views
Activity
Hi im doing an app for iPad an iPhone so I have a condition to detect the screen size .regular o .compact then I show an iPad navigation view or a tabview on iPhone or .compact view. if self.sizeClass == .compact && settings.getShowHomeOnIphone()
{
withAnimation(.easeInOut(duration: 1) ){
return NavigationViewForiPhone()
}
}
else
{
withAnimation(.easeInOut(duration: 1) ){
return NavigationViewForiPad()
}
}
so the problem is that when on the iPhone (plus size and max size) change to landscape or portrait the views changes is not smooth I try a lot of thing to animate the transition but I don't find the way.
Any idea or suggestion?