Re: UITableView's tableFooterView and autolayout
Re: UITableView's tableFooterView and autolayout
- Subject: Re: UITableView's tableFooterView and autolayout
- From: Sebastian Celis <email@hidden>
- Date: Wed, 11 Jun 2014 11:21:30 -0500
On Jun 11, 2014, at 9:41 AM, Torsten Curdt <email@hidden> wrote:
> Thanks but there you are setting the frame yourself. The idea was to
> use constraints. Usually you would pin them to the superview. But in
> this case...
My solution uses Auto Layout constraints to get the appropriate size for the header view using systemLayoutSizeFittingSize. Given how UITableViews work when coupled with Auto Layout I believe you do have to set the frame yourself but you can determine what the frame should be using Auto Layout constraints.
You can not use Auto Layout to *position* the header or footer view, but you can use Auto Layout to layout any views within that header or footer. If I understand your original situation, you probably want to use a UIView container for your label and then position that label within its container using Auto Layout.
- Sebastian
_______________________________________________
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