Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这种奇怪的行为,当我更新 UITableView 的 dataSource 并调用 reloadData 时,单元格会更新,但表格的大小不会改变。
我真的没有任何线索......有人可以帮忙吗?
您应该仔细检查两者numberOfRowsInsection,heightForRowAtIndexPath:您的 UITableViewCell 的高度是否与默认高度 44.f 不同?
numberOfRowsInsection
heightForRowAtIndexPath:
如果它是自定义 UITableViewCell,请仔细检查 nib(如果您使用的是 nib)或再次检查您的代码
问题通常在于numberOfRowsInSection,确保您正确地重新计算表大小
numberOfRowsInSection