Guest User

Untitled

a guest
Feb 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. class FirstViewController: UIViewController {
  2.  
  3. var loggedIn = false
  4.  
  5. override func viewDidLoad() {
  6. super.viewDidLoad()
  7. // Do any additional setup after loading the view, typically from a nib.
  8. }
  9.  
  10. override func viewDidAppear(_ animated: Bool) {
  11. super.viewDidAppear(animated)
  12.  
  13. if !loggedIn {
  14. self.performSegue(withIdentifier: "LogInSignUp", sender: self)
  15. }
  16. }
  17.  
  18. // This is the target of the unwind segue
  19. @IBAction func finishedLoggingIn(_ segue: UIStoryboardSegue) {
  20. loggedIn = true
  21. print("logged in and ready to go!")
  22. }
  23.  
  24. }
Add Comment
Please, Sign In to add comment