I have 2 views within my storyboard. The first view is a login screen, where the user enters the email and password, after clicking the login button a function creates a HTTP connection with the API and the API checks and authenticates the user and sends back JSON data. Now the JSON data is in VIEW 1. I have programmatically performed my segue as seen in the code below:
dispatch_async(dispatch_get_main_queue()) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("detailView") as! UIViewController
self.presentViewController(vc, animated: true, completion: nil)
}
How can I pass the JSON data from VIEW 1 to VIEW 2? I tried to use prepareForSegue by that asks for the segue identifier and because I have programmatically performed my segue I don't have segue identifier. My Storyboard image is below:
Any help will be greatly appreciated. Thanks in advance. If you need more information to answer the question then please let me know.