开发者

Prevent header from being updated after calling reloadData?

开发者 https://www.devze.com 2022-12-30 00:23 出处:网络
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 the开发者_JS百科re any way to p

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 the开发者_JS百科re any way to prevent this behavior in order to maintain state in the table's header?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消