I have an app that has a UITableView
and in my Cells
I have UIImageViews
and UILabels
that change images/textColors for a day theme and a night theme (trying to be automatically set).
My issue is that I set the images and colors when the table is populated with cellForRowAtIndexPath
and its during the day "theme", then if I reopen the app hours later in the night "theme" and the app is still in the "background" and not needing to be reloaded (ie viewDidLoad
doesn't fire), the day "theme" shows until I scroll the UITableView
and then the night "theme" shows when new cells are brought into view by scrolling.
How should I set the objects in my cells when changing around time of the day? I was thinking to use an NSTimer
, but I'm not sure how to update the objects in my cells. I was also thinking about using the appropriate methods in the AppDelagate
to set things in motion, but is there a way to force reloading the TableView
?
Any suggestions?