Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent header from being updated after calling reloadData?

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?

like image 826
john Avatar asked Nov 23 '25 00:11

john


1 Answers

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

like image 171
kennytm Avatar answered Nov 25 '25 14:11

kennytm



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!