I'm making an app which will shuffle cards and then display them in a table view. I want to provide a refresh button in the navigation bar, so that users can update the list with a new set of shuffled cards. I started the project with the Utility Application template and have put pretty much all of the logic of the app in the MainViewController.m file which I plan to refactor out later into individual object files.
When I click Refresh, it runs the refresh action which shuffles the cards and then runs
[self.tableView reloadData] and even accesses
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
for each table row since I have it print out an NSLog statement each time this is run. It even changes the textLabel.text of each cell which I've also verified with an NSLog statement right after changing it.
I've tried
[self.tableView setNeedsDisplay] and
[self.view setNeedsDisplay] and nothing will refresh the screen! I've looked around different forums and can't see any solution to this. Could anyone please push me in the right direction?