Yalantis / FoldingTabBar.iOS

Folding Tab Bar and Tab Bar Controller
https://yalantis.com
MIT License
3.68k stars 459 forks source link

TabBarViewController delegate #5

Closed balkarov closed 8 years ago

balkarov commented 9 years ago

Hello! How to call this method

maksTheAwesome commented 9 years ago

Runia, I've added I've created the pull request that fixes the problem. If you do not have time to wait update the "itemInTabBarViewPressed" method in YALFoldingTabBarController with the following code:

- (void)itemInTabBarViewPressed:(YALFoldingTabBar *)tabBarView atIndex:(NSUInteger)index {
    BOOL should = YES;
    if ([self.delegate respondsToSelector:@selector(tabBarController:shouldSelectViewController:)]) {
        should = [self.delegate tabBarController:self shouldSelectViewController:[self.viewControllers objectAtIndex:index]];
    }
    if (should) {
        self.selectedViewController = [self.viewControllers objectAtIndex:index];
    }

}
IgorMuzyka commented 8 years ago

This fix #11 now included in master so until next version is released if you use your pod like

pod 'FoldingTabBar', :git => 'https://github.com/Yalantis/FoldingTabBar.iOS.git'

you'll have this method. Will release a new version a bit later