Created
June 13, 2019 17:35
-
-
Save vialyx/7646da5352f6aca343e73af34a42e592 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension Segue { | |
static var signup: Segue = Segue(identifier: "signup") | |
} | |
class OBEmailViewController: UIViewController { | |
// Some code | |
// Actions | |
@IBAction func next(_ sender: Any) { | |
perform(segue: .signup) | |
} | |
// Navigation | |
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
// That way is straight forward without grammar mistakes | |
if segue.equal(.signup), | |
let vc = segue.destination as? OBSignupViewController { | |
vc.email = emailTF.text | |
} | |
} | |
// Some code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment