Re: UILabel contentView is 'left' out of IB but the default should be 'redraw'
Re: UILabel contentView is 'left' out of IB but the default should be 'redraw'
- Subject: Re: UILabel contentView is 'left' out of IB but the default should be 'redraw'
- From: Roland King <email@hidden>
- Date: Wed, 9 Feb 2011 22:38:27 +0800
Thanks for both your answers to my questions today David. I'll file a docs bug on the UILabel and if I have time to distill out a small test case for the resizing I'll file that too, I'm not quite sure what a UILabel should do if it's set to 'left' and is resized, but I think it should do the same thing whether it's resized with setBounds or setFrame. In this case by the way the label was centered and had a background so when it wasn't redrawn but just shifted to one side it looked really odd. I have set it to redraw in my code and used setFrame: for good measure anyway, there's no transforms in this code.
On 09-Feb-2011, at 1:11 AM, David Duncan wrote:
> On Feb 8, 2011, at 7:15 AM, Roland King wrote:
>
>> 1) does that sound like an IB bug which needs reporting?
>
> This looks like a bug in the documentation, as labels created in code are created using left content mode.
>
>> 2) why does setFrame cause a redraw when setBounds/setCenter doesn't if the contentMode is set to 'left' either they all should, or they all shouldn't.
>
>
> This behavior is specific to UILabel and it is probably a bug that setBounds: doesn't do this as well. However this resizing is only done in cases where the text options set on the label would require such behavior (such as setting auto sizing text).
>
> Since it sounds like you want the redraw behavior, I would probably just make that change in IB and go from there.
> --
> David Duncan
>
_______________________________________________
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