In a tableview I’m displaying local soccer matches from an NSMutableArray that are planned for this week. If there are no matches, I want to display a cell saying something like: ‘No matches this week’. I think I have to call for another array, or probably dictionary, if the NSMutableArray of matches is empty, but at this point I have no idea where to start. Any thoughts on how to achieve this?
In a tableview I’m displaying local soccer matches from an NSMutableArray that are planned
Share
First, test if there are matches. If there are, tell the tableView there are as many rows as matches. If there aren’t, return 1 row.
Then, when creating your cell, check if there are matches, if there are, show the appropriate one, if there aren’t, show “No Matches”.