In my application deletion, I have this method that is automatically turned off to do something when the view controller is selected.
If the viewController type is SavedViewController, then this is a subclass of UITableView, and I would like to update the table. However, this code does not work:
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
if([viewController isKindOfClass: [SavedViewController class]]) {
[viewController.tableView reloadData];
}
}
The error I get is "the query for tableView is not a structure or union. In the SavedViewController class, I can do this just fine:
[self.tableView reloadData]
So what am I doing wrong in my function?
source
share