簡體   English   中英

重新加載具有不同高度和內容的現有UITableViewCell

[英]reload existing UITableViewCell with different height and content

要重新加載單元格的高度和內容,我致電:

[[self tableView]reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:0 inSection:kSectionShoppingList]] withRowAnimation:UITab

該函數調用HeightForRow數據源方法,但不調用CellForRowAtIndexPath數據源方法。

是他們的默認行為,還是我錯過了什么?

嘗試使用reloadSectionAtIndexPath方法。

更新

在顯示單元格之前,您需要計算高度。 就像在heightForRowAtIndexPath中一樣。

使用此方法顯示可變高度的行。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM