I have a UITableView with a custom header that maintains some state. When I call reloadData to change/update the data in the UITableView, the header gets reloaded too. Is there any way to prevent this behavior in order to maintain state in the table's header?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Don't put those states in the header. You've mixing the "view" with "model" in the MVC design.
Anyway, you could reload specific rows with -reloadRowsAtIndexPaths:withRowAnimation:
.