I am trying to use CoreData to populate a UITableView. I have been using the developer “Locations” project, and I think I have everything correct. But, now I am getting the following error when I build:
request for member 'tableView' in something not a structure or union
Why would it be confused about tableView? I am using it many times in the methods. The errors seem to be coming from:
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
Ideas?
Are you sure you’re properly subclassing
UITableViewController? As in,EDIT: As Rob Lourens says, your problem is that you’re subclassing
UIViewControllerinstead ofUITableViewController.UIViewControllerhas a genericviewproperty, but no table view–use it for any situation where you don’t need to manage a table view, and useUITableViewControllerfor any situation where you do.