Prevent header from being updated after calling reloadData?

橙三吉。 提交于 2019-12-13 14:20:27

问题


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:.



来源:https://stackoverflow.com/questions/2805326/prevent-header-from-being-updated-after-calling-reloaddata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!