In didSelectViewController function, scrollToTop not working on tapping tabBarItem
<pre><code>- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {

    tabBarController = self.router.tabController;

    for(UINavigationController* view in tabBarController.viewControllers) {
        UIViewController* topView = view.topViewController;
        if([topView isKindOfClass:[DiscussMainViewController class]]) {
            viewController = (DiscussMainViewController*)view;
            break;
        } else if([topView isKindOfClass:[JobsMainViewController class]]) {
            viewController = (JobsMainViewController*)view;
            break;
        } else if([topView isKindOfClass:[DailyListViewController class]]) {
            viewController = (DailyListViewController*)view;
            break;
        } else if([topView isKindOfClass:[ProfileTableViewController class]]) {
            viewController = (ProfileTableViewController*)view;
            break;
        }

    }

    if([viewController isEqual:tabBarController.selectedViewController]) {
        if([viewController respondsToSelector:@selector(scrollToTop)]) {
            [viewController performSelector:@selector(scrollToTop) withObject:nil];
        }
    }
}
</code></pre>

<p>whereas, scrollToTop function in all view controllers.. is like that</p>

<pre><code>- (void)scrollToTop {
    [self.table setContentOffset:CGPointZero animated:YES];
}
</code></pre>