I am looking to do some controller configuration to the presented controller off a Tab Bar Controller. Is there a nice interception point where I can pass in some values to the destination controller, much like the prepareForSegue method?
Much appreciated.
All your controllers from a tabview are accesible through the array of the tabviewcontroller. You can modify them directly there. If you are looking to change something before the user sees that specific one, set the delegate and implement the delegate method. (you can simply change the vc inside this method and return yes)
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITabBarControllerDelegate_Protocol/Reference/Reference.html
tabBarController:shouldSelectViewController:
Asks the delegate whether the specified view controller should be made active.
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController Parameters
tabBarController
The tab bar controller containing viewController. viewController
The view controller belonging to the tab that was tapped by the user.
Return Value
YES if the view controller’s tab should be selected or NO if the current tab should remain active. Discussion
The tab bar controller calls this method in response to the user tapping a tab bar item. You can use this method to dynamically decide whether a given tab should be made the active tab. Availability
Available in iOS 3.0 and later.
Declared In UITabBarController.h
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With