mercredi 13 juillet 2016

Terminating Uncaught Exception NSException - After Connecting to Server

I've seen similar questions to this, but this error doesn't come up because of missing outlets (yellow warnings)

I go to my thank you page using the following code - and it works from everywhere

let login = self.storyboard?.instantiateViewControllerWithIdentifier("ViewThankyou")
                self.presentViewController(login!, animated: true, completion: nil)

The problem is that when I send info to a php file on my server, the app crashes if i try to use the above code when the php file responds.

let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { data, response, error in

The response works without presentViewController and presentViewController works if I don't use it in the response. I DID set the storyboard ID "ViewThankyou" and it works from everywhere except after connecting to my php file.

Aucun commentaire:

Enregistrer un commentaire