Work around I used to achieve above effect.
When I need to push my new UIViewController
for which I want to deselect all of the UITabBarItem
of my tabBarController, first I do the following things
- Set selected index of tabBarController to last tab.
- Set deselected image in last
UITabBarItem
- Get navigation controller of last tab and pop it to
RootViewController
. - Now push my new controller
- Hide back navigation button in my view controller.
Hence I am able to show a Viewcontroller keeping user experience as current view is not in any of the tabs.
Thanx.