this is more than a question, a request for advice.
How resource expensive would it be to reload a UITableView every time an app will enter foreground?
What I need to accomplish is to change the color of the UILabel inside the cells of the UITableView depending on the current date, however knowing average users don’t normally terminate their app and simply leave it there running in the background, I would assume that the tableView: cellForRowAtIndexPath: method would not get called when they launch it again, and therefore, the UILabel would not update accordingly.
I know that the reloadData method calls the tableView: cellForRowAtIndexPath: method.
My question is, would you advice against calling this method every time the app would enter foreground?
If so, what other alternatives do I have?
Thank you in advance.
Your help is very much appreciated.
reloadDatashould only calltableView:cellForRowAtIndexPath:for those rows actually visible on the screen. The speed of it will mainly depend on your other UITableViewDataSource and UITableViewDelegate methods, particularly the height-related delegate methods and the data source methods listed for “Configuring a Table View” in the documentation.The best idea is probably to just try it and find out.