一个部分的 UITableView 高度 [英] UITableView height of a section

查看:23
本文介绍了一个部分的 UITableView 高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含 3 个部分的 UITableView.我的各个单元格的高度不同(折叠-展开).我需要一种方法来计算每个单独部分的高度,即每个部分中单元格高度的总和.最好不要在每次需要时计算 tableView 已经完成的所有事情.

I have a UITableView that has 3 sections. My individual cells vary in height (collapse-expand). I need a way to figure out the height of each individual section, i.e. the sum of cell heights in each section. Preferably without calculating everything the tableView already has done each time I need it.

有没有办法推导出或访问这样的值?

I there a way to deduce or access such a value?

推荐答案

你看了吗 -rectForSection:(也可能是 -rectForFooterInSection:)?

Did you look at -rectForSection: (and possibly also -rectForFooterInSection:)?

这篇关于一个部分的 UITableView 高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆