Hi I have a project with a TabBar Controller as root view controller and this one has 5 Views.
TabBar [Tab 1, Tab 2, Tab 3]
[Tab 1 Table view with Navigation View Controller] [Tab 2, Second Table view with Navigation View Controller] [Tab 3 Third Table view with Navigation View Controller]
In the first Tab the when the user taps on the Row the user will be move to another Table View with a embedded Navigation View Controller. This list of details when have 2 UITableViewRowAction in which I display another view with some information. Here is the problem, when I go back from the View the child Table View the tab control has disappear.
I will appreciate if someone can give idea how to fix this problem. The Idea is to be able to go back to the Detail Table View without the need to make the segue to the root view because, I tried this already and takes me directly to the first TAb instead of the detail table view.
Another thing if this needs code I will also appreciate if the provide code is in swift.
Here is the code to call the view from the a UITableViewRowAction:
var details = UITableViewRowAction(style: .Normal, title: "Edit") {
(action: UITableViewRowAction!, indexPath: NSIndexPath!) -> Void in
let destination = self.storyboard?.instantiateViewControllerWithIdentifier("editFolder") as! EditFolderViewController
self.showDetailViewController(destination, sender: self)
}
And to go back to the table View I use a segue created in the storyboard so there is no code.
Since you didn't show how you dismiss the EditFolderViewController, I can only guess as how you hooked up the segue in the storyboard.
As you are using showDetailViewController you will be getting essentially a modal view from EditFolderViewController, is that what you what?
In order to dismiss a viewController I would recommend trying to call
self.dismissViewControllerAnimated(true, completion: {
//do stuff after view is off screen
})
in EditFolderViewController at the spot where you were triggering the segue.
If you don't want to do that you can try setting up an unwind segue
action in your storyboard. Here is a tutorial that walks you through that if you are unfamiliar.