I have a tab bar app with navigation controllers on 4 out of the 5 tabs on the app. I have a ‘reset app’ function within my app which clears all data etc… and I would also like that to pop all of the view controllers back to their top view. I know how to pop to root using popToRootViewControllerAnimated for a single nav controller but is it possible to pop all of the view controllers on each tab?
Share
You need to enumerate through viewControllers array of tabBarController & pop to root view controller if controller in array is UINavigationController like-