I have a snippet of analysis code that checks if a user is logged in:
PFUser.logInWithUsernameInBackground("myname", password:"mypass") { (user: PFUser!, error: NSError!) -> Void in if user != nil { // Do stuff after successful login. } else { // The login failed. Check error to see why. } }
After successfully logging in, I want to send the user to a new session. I cannot do this in the storyboard because I want segue to happen if the conditions are met. Anyway, to programmatically create a segue?
source share