以下代码:
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
if (viewController == [tabBarController.viewControllers objectAtIndex:0]) {
MySearchViewController *controller = viewController;
[[controller tableView] reloadData];
}
}
产生以下警告:
Incompatible pointer types initializing 'MySearchViewController *__strong' with an expression of type 'UIViewController *__strong'
什么是正确的方法来viewController
转换到正确的类MySearchViewController
来调用它的方法?