You are instantiating a new UITabBarController
instance as the method name suggests.
If you are in the context of a UIViewController
within the UITabBarController
, just use
self.tabBarController
If the context is not in UITabBarController
, self.tabBarController
return nil.