I’m having a really strange problem. Here is the code I have that should set my UITableViewCell text label and detail text label:
[[cell textLabel] setText:[[recentSearches objectAtIndex:indexPath.row] name]];
[[cell detailTextLabel] setText:[formatter stringFromDate:[[recentSearches objectAtIndex:indexPath.row] date]]];
recentSearches is an NSArray of RecentSearch objects, which are NSManagedObjects. A RecentSearch object has two instance variables: an NSString *name and an NSDate *date;
When I try to display my table, I get blank cells, though the cells do appear. What’s weirder is that when I select one, didSelectRowAtIndexPath takes the data and transfers it to another view correctly.
Any suggestions would be really helpful. I’m pretty stumped!!
Check the numberOfRowsForSection delegate method, return 10 as harcoded and
Assign some hardcoded values and see if you are able to see any value.
If you are able to see the value in cell then the problem is at numberOfRowsForSection count you are returning.