Resizing UIView
Resizing UIView
- Subject: Resizing UIView
- From: DKJ <email@hidden>
- Date: Wed, 23 Sep 2009 19:34:11 -0700
I'm trying to understand the autoresizingMask property of UIView.
I want to display 1, 2, or 3 text labels in the tableHeaderView of a
UITableView. I'd like the header view to adjust its size
(specifically, its height) according to how many labels it's
displaying. (I'm using labels because I want each line to have a
different colour or font.)
I had the fantasy that I would create a UIView with its
autoresizingMask property set to UIViewAutoresizingFlexibleHeight, and
assign it to the tableHeaderView property of the table view. Then I'd
sit back and watch it resize itself to accommodate however many labels
I stuffed into it as subviews.
I tried implementing this a couple of different ways, without success.
Is what I want to do even possible?
I know I can just calculate each height value given the number of
labels to be displayed, but I'd like to find an easier way if there is
one. At the least, I need to learn more about how these resizing
properties are supposed to work.
dkj
_______________________________________________
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