I have a tab bar controller application that allows for anonymous access however one tab requires the user to be logged in. I am unsure of how to make it happen. I have a login view controller that has a login/cancel option that I can display modally on view load for the tab bar controller however the user can simply press cancel whereby the login view controller is dismissed. I am unclear on my logic as to how to make it happen. How do I have my application flow properly to where users can browse anonymously however keeping one tab an only logged in option.
I have a tab bar controller application that allows for anonymous access however one
Share
The following would probably work:
[self.tabBarController.selectedViewController presentModalViewController:loginVCanimated:NO];
Without knowing more code structure, I can’t be more specific on suggestions. The gist of it is, you need to find a navigation controller or an acceptable view controller hierarchy capable of handling presentModalViewController to present your login view controller.