I have a login screen that has an email address and password. I am using firebase Auth.
The login screen is integrated into the navigation controller. On the login screen, it goes to UserDetailsController. The navigation bar has a βrearβ navigation element that comes with the navigation controller. I can't drag this to be the way out.
I was wondering if there is an easy way when the βreverseβ is pressed and the user returns to the login page to log out. The code to exit the system is relatively simple using Firebase Auth. The problem I am running into works in LoginController if I return here from UserDetailsController.
I read about using self.presentingcontroller to determine which controller I came back from, but I keep getting zero. And I was not sure if this is the best / only option for determining which controller I came back from.
Thanks.
source share