I am trying to build a tab bar controller, that has some navigation controllers embedded within. Below is a section of my storyboard:
I am just trying to hook up the screens currently. I haven’t even started the data model yet. When I run the simulator though I get the Add Team screen like this:
I can’t see my static table view cells that I use to take input from the user. You can see them in the first image though. I’m not sure why, but I’m guessing maybe wrongly that it’s to do with the prepareSegue
method.
Mine is like this and taken from the Checklist tutorial:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "AddTeam" {
let navigationController = segue.destinationViewController as! UINavigationController
let controller = navigationController.topViewController as! TeamDetailViewController
controller.delegate = self // set its delegate to itself
}
}
Because my navigation controller is within a tabbar is this why my TableView isn’t displayed? I did try to start by getting the topViewController of the TabBarController, but it doesn’t have this method, so I wasn’t sure how to proceed? If that is even why my Table isn’t being displayed?