When I Used [UITabBarController setSelectedIndex:] and - popToRootViewControllerAnimated:, for example:
- (void)backViewControllerAnimation:(BOOL)animation {
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}
[OLTabBarController.defaultTabBar.tabBarController setSelectedIndex:0];
[self.navigationController popToRootViewControllerAnimated:YES];
}
the viewController is not dealloc, but if I delete [UITabBarController setSelectedIndex:0], like this:
- (void)backViewControllerAnimation:(BOOL)animation {
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}
[self.navigationController popToRootViewControllerAnimated:YES];
}
the viewController can dealloc, I want known what happend, I need - setSelectedIndex: method, how can I make viewController perform - dealloc method?