I've got a tab bar set up in a storyboard with 4 tabs. The app has a login system, and when I log out I want to zero-out the second and third tabs. The second and third tabs content depends upon which user is logged in, so I don't want the old info appearing there.
How would I re-initialise them?
This is a situation suitable for NSNotification
usage. When the 'logged-in' status changes, post a notification. Observe this notification in the appropriate view controllers and have then react by enabling / disabling / showing / clearing UI elements in their view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With