I'm about to make TabBar as Apple docs read - program. I want to find TabBar selection so that I have used the following representative methods. I'm not sure why, but do not get out of these methods when I turn tabs on your iPhone. Anyone here is going wrong, can provide some ideas about this. It would be really helpful. Thank you
- (bool) TabBarController: (UITabBarController *) tbController shouldSelectViewController: (UIViewController *) ViewController {if (ViewController == [tbController.viewControllers objectAtIndex: 3]) enable {// All But do not return the last tab; } Yes return; } - (void) TabBarController: (UITabBarController *) tbController didSelectViewController: (UIViewController *) ViewController {if (ViewController == [tbController.viewControllers objectAtIndex: self.appTabs.count]) do {// some action}}
you have to set delegate when you forgot built UITabBarController?
some TabBarController.delegate = self;
Comments
Post a Comment