Usually the registration/login view controller is not integrated inside the tab bar.
It is a completely separate view controller (may be contained in its own navigation controller).
Once the app is launched you should check in code if registration/login should be opened and open it as modal view controller.
EDIT
Assuming that you have initialised tabBarController
property, registrationViewController
property and isRegistered
method that returns BOOL
in your AppDelegate
,
Put the next code inside your application:didFinishLaunchingWithOptions:
method (right before return YES;
):
if ([self isRegistered] == NO) {
UINavigationController *navController = [[UINavigationController alloc]
initWithRootViewController:self.tabBarController];
[self.tabBarController presentViewController:navController
animated:NO
completion:NULL];
}
- There might be better place to put this code but this is the simplest to explain, assuming that I have no idea what classes you have in your project.