In my app delegate, I have this method that gets stubbed out automatically, to do something when a view controller gets selected.
If the type of the viewController is SavedViewController, then it's a UITableView subclass, and I would like to refresh the table. However, this code doesn't work:
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
if([viewController isKindOfClass: [SavedViewController class]]) {
[viewController.tableView reloadData];
}
}
The error I get is "request for tableView is something not a structure or union. Within the SavedViewController class, I can do this just fine:
[self.tableView reloadData];
So, what am I doing wrong in my function?