0

Here is my code:

if(statusCode != 200) {

                let jsonStr = NSString(data: data!, encoding: NSUTF8StringEncoding)
                print("Error could not parse JSON: '\(jsonStr)'")
            }
            else {

                print("Everything Looks good: \(responseData)")
                self.performSegueWithIdentifier("login", sender: self)

            }

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        super.prepareForSegue(segue, sender: sender)
    }

performSegueWithIdentifier does not do anything.

Update

print("Everything Looks good: \(responseData)")
                dispatch_async(dispatch_get_main_queue(),{
                    self.performSegueWithIdentifier("logi‌​n", sender: self)
                })

throws

2015-07-16 00:40:18.298 phoenix[2750:259334] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<phoenix.LoginViewController: 0x7fab62514d30>) has no segue with identifier 'logi‌​n''
*** First throw call stack:

It should not be the case, because enter image description here

Himanshu Yadav
  • 13,315
  • 46
  • 162
  • 291

0 Answers0