TableViewController B shows up when a button in ViewController A is tapped. A user selects an item in B and then is led back to A. I used the following code to go back to A from B. But how can I pass the selected item ([Int: String])
to A?
navigationController?.popViewControllerAnimated(true)
Below is the code to navigate to B from A
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let nextViewController = storyBoard.instantiateViewControllerWithIdentifier("categories") as! CategoryListViewController
self.presentViewController(nextViewController, animated:true, completion:nil)
In your
ViewController A
class create an emptyDictionary
like thisNow when you move from
TableViewController B
toViewController A
set the value todict
like this