Question

I'm learning iOS and I'm working on what amounts to a Proof of Concept app in XCode 4.2. I essentially want to allow a user to enter a user/pass combo and if the user is in an array of objects, pass them on to the "Content" view, but if not, pass them on to the "Register" view.

In either case, since the app itself will be a tabbed app (though the login and register views are not tabbed), I need to be able to segue from a typical ViewController to a TabViewController.

- (void)logIn:(id)sender{

[self performSegueWithIdentifier:@"Content" sender:sender];

}

Currently, I have the app segueing to the proper ViewController, which is a TabBarController embedded in a NavViewController...but once it gets there...there are no tabs!!

What am I doing wrong?

enter image description here

Was it helpful?

Solution

Now you aren't loading TabBarController that's why you don't have any tabs.

What I suggest you:

In Log In ViewController you can also add "register" button, and place a segue from it to Register View Controller.

Add IBAction from log in button, which will check for log in and pass, and if it's OK load Content ViewController or TabBar Controller with Content ViewController.

I strongly recommend you to study iOS5 storyboard tutorials to get to know how the view controllers interacts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top