I solved it making the label as wide as its superview before calling sizeToFit.

Best regards.

On Tue, Jun 26, 2012 at 12:59 PM, Takeichi Kanzaki Cabrera
<[email protected]> wrote:
> 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.



-- 
Regards,
Takeichi Kanzaki Cabrera
Linux Registered User #308138

If you want to be original,
be yourself.
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to