UILabel sizeToFit is shrinking the Label width
UILabel sizeToFit is shrinking the Label width
- Subject: UILabel sizeToFit is shrinking the Label width
- From: Takeichi Kanzaki Cabrera <email@hidden>
- Date: Tue, 26 Jun 2012 12:59:10 +0200
Hi All, I'm working on an app where the position of the subviews
depends on the sizes of the others. I have implemented a method to
reallocate the components. As part of the interface I have somes
UILabel that loads the text to display dynamically, the length of the
text is variable and I'm using [label sizeToFit] method to properly
display it (previously I set label.numberOfLines = 0), until here
everything works ok.
My problem began with the rotation, in the method
didRotateFromInterfaceOrientation: I call the reallocation method and
everything works, with the exception that the labels are getting
smallers with each rotation. Without calling sizeToFit I don't have
this problem, but how in landscape orientation the label needs less
lines to display the text the distances between the controls increase.
The font size and minimum font size are the same value, I
enable/disable autoshrink, I try the different autosizing masks,
getting the same problem, any idea?.
--
Regards,
Takeichi Kanzaki Cabrera
Linux Registered User #308138
If you want to be original,
be yourself.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden