Reputation: 77
My current storyboard looks like the following:
The problem is that I don't know what relationship the "Login View Controller" should have with the other views. As a result, when I build the project - "View Controller" comes up as a black void, .
Upvotes: 0
Views: 43
Reputation: 5341
Click on your tabBarController and type in an identifier, say yourVCID
You can then reach your view controllers like so:
let controller = self.storyboard!.instantiateViewControllerWithIdentifier("yourVCID") as! UITabBarController
// Above line will give you the address(reference) to the View controller that has an id "yourVCID". This is where you want to go. here self is the Login View Controller(from where you want to go). StoryBoard is the storyboard that contains the view Controller represented by self.
self.presentViewController(controller, animated: true, completion: nil)
// Above line will present the controller and this controller will originate from self (Login View Controller) in this case
This will automatically present the Home screen (View Controller) of your Tab bar controller
Upvotes: 1