Added the case when the parent is a UITabBarController