I have a HomeView with 1 button, that shows the login form.
When the user logs in, I create the tabbarcontroller with 3 buttons:
Home
Products
Exit
The thing is, if the user, already logged in, clicks on the home button, it will show HomeView and I need to hide the Login button and show a Exit button.
What I can’t find is the method to check the item clicked and the view loaded so I am able to work with the buttons.
I have both, Login and Exit buttons, created on Interface builder and linked with your actions and they are also referenced on the code.
Thanks in advance for any help.
you need somthing like that:
BOOL isLoggedIn;
You have to store the BOOL in something like a database or plist or singleton and set it to YES if the user pressed the Login button or NO if the user pressed the Exit button.
Hope this helps