简体   繁体   中英

How do I set a fixed height for a UIView placed as the footer of a UITableView?

I haven't been able to change the height of the view. I've tried changing it's .bounds , .frame , and height field in the size inspector. As it is, the view has a height larger than what I've set in IB. When I go to debug the view hierarchy, the UIView's height goes beyond the wrapper views for the table view and gives me excess that I'd like to trim.

How I've added the view to the tableview . I assume this means the UIView is the now the footer of UITableView!

How far the UIView has extended the height .The blue you see at the top is the bottom edge of the last cell in the table. All the grey is excess space from the UIView.

I assume this means the UIView is the now the footer of UITableView!

Nope, this is wrong. Looks like you just added a view as a subview of your table view. You need to set your table view's tableFooterView property .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM