In one of my UIViewControllers in my UITabBarController, I do this:
MyTabBarController *myTBC = (MyTabBarController*)self.parentViewController;
for(UIViewController *anyVC in myTBC) {
if([anyVC.class isKindOfClass:[SecondViewController class]])
sVC = (SecondViewController *)anyVC;
sVC.userLocation = userLocation;
}
but I get a warning at the for…line saying:
Collection expression type MyTabBarController may not respond to countByEnumeratingWithState:objects:count.
MyTabBarController is a subclass of UITabBarController.
This line:
should be: