I want to be notified when the UITabbarViewController is loaded completely and is being displayed on the screen?
Since it’s inheriting from UIViewController i tried setting the delegate to my appdelegate and implemented viewDidAppear, but it never get’s called.
Any solution??
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.tabbar.delegate = self;
//other stuff
}
- (void)viewDidAppear:(BOOL)animated
{
NSLog(@"asdasd");
}
When you set a delegate of UITabBarController you will only be able to override UITabBarControllerDelegate methods and not UITabBarController methods.
Solution: A
Create UITabBarController from code
Solution: B
Subclass UITabBarController
For both solutions you can either do you code within viewDidLoad or send a NSNotification with the info that the view is fully loaded.