I am trying to call an API after GoogleSignindelegate which will check for existing user if not it will open a form to signup. Here what i did "
I defined a push segue from current controller to destination controller and named as login2 after that if user click google signin button we will check for its existence in our database:
func getGoogleData(let uId:AnyObject, let emailId:AnyObject, let name:AnyObject){
accountType = "GOOGLE"
accountId = uId as! String
self.emailId = emailId as! String
self.name = name as! String
print(accountId)
print(accountType)
self.appData.setValue(self.accountId, forKey: "uId")
self.appData.setValue(self.accountType, forKey: "uAccountType")
self.appData.synchronize()
self.checkAlreadyExist()
}
after async we call uiRefresh method to go to destination segue:
func do_ui_refresh(){
dispatch_async(dispatch_get_main_queue(), {
if(self.appData.stringForKey("userId") == nil){
self.performSegueWithIdentifier("login2", sender: self)
}
else{
self.performSegueWithIdentifier("loginAlready", sender: self)
}
return
})
}
But every time when i run app it shows no Receiver () has no segue with identifier 'login2'
but i defined a segue i can clearly see it in inspector.
Any help is appreciated.
