I created an iOS application with a tab bar template, so here is the UITabBarController with buttons on the bar. The problem is how to set it up as a delegate. I found in SO that it should be installed programmatically in AppDelegate, but I believe that this is not possible because I do not have access to the tab bar controller as an output.
I added the correct value to @interface (both ViewController and AppDelegate), but don't know what to do next.
@interface ViewController : UIViewController <UITabBarControllerDelegate>
I hope I do not need to get rid of the entire application template, and you can configure the Tab Bar Controller created in IB for delegation.
I definitely want him to delegate to create a tab selection in the event, like this:
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController;
Any idea?
user2631838
source share