long time listener, first time caller.
I'm working on an app that consists of a login page (View Controller) and then dismisses to reveal a tab bar controller with 4 tabs, each with a Navigation Controller with their own views.
I'm looking to allow a user to click a "Logout" button that dismisses all the views associated with the Tab Bar Controller, segues to the Login View Controller, and then instantiates a new Tab Bar Controller. Without dismissing and creating a new Tab Bar Controller, all of the Tab views hold the old user data, since they are populated with "ViewDidLoad" functions. Unless there is another way to clear and trigger the "ViewDIdLoad" functions without dismissing all of the views/tab bar controller.
I'm open to other solutions as well since I'm very new to IOS Swift programming and am self taught.
My structure looks like this (note that the app enters the Tab Bar Controller first, if no current user is found it kicks back to the Login View Controller which dismisses itself upon login):Login/Tab Bar Controller relationship