Re: Adding subviews to UITableViewCell's contentView and autoresizing behavior
Re: Adding subviews to UITableViewCell's contentView and autoresizing behavior
- Subject: Re: Adding subviews to UITableViewCell's contentView and autoresizing behavior
- From: Ray <email@hidden>
- Date: Fri, 04 Mar 2011 13:50:36 +0900
> Flexible width means "change my width if my superview's width changes" and accessory views cause the contentView to shrink from its original state as the full width of the cell (since the contentView must make space for the accessoryView). Therefore, your subview auto shrinks with it since you set the mask. Make sense?
>
> Luke
Thanks for your fast reply, Luke!
It does makes sense. I wanted to use the autoresizing mask because it supports rotation (of the device) in a nice way for my subview (initially I used an animation to adjust the width of the subview, but I wanted to make things simpler). Because my fixed-width accessoryView will always be there (in my cell's implementation in the real app that is), would you consider it good practice to take into account the offset in defining my subview's width, if you know what I mean?
Thanks,
- Ray.
_______________________________________________
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