From b70ab09cdf3a211c25ea8b081390d5472468bb02 Mon Sep 17 00:00:00 2001 From: Miles Crabill Date: Tue, 9 Dec 2014 20:42:40 +0100 Subject: [PATCH] logout button moved to left --- socialCalendar/LoginViewController.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/socialCalendar/LoginViewController.swift b/socialCalendar/LoginViewController.swift index 7959c62..8efdea9 100644 --- a/socialCalendar/LoginViewController.swift +++ b/socialCalendar/LoginViewController.swift @@ -15,6 +15,7 @@ class LoginViewController: UIViewController { @IBOutlet weak var messageLabel: UILabel! @IBAction func loginVerifyButton(sender: AnyObject) { + var username = usernameTextField.text var password = passwordTextField.text @@ -119,8 +120,8 @@ class LoginViewController: UIViewController { // Pass the selected object to the new view controller. if segue.identifier == "login" { let vc = segue.destinationViewController as CalendarTabBarViewController - vc.navigationController?.navigationItem.hidesBackButton = true - vc.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Log Out", style: .Plain, target: self, action: "logout") + vc.navigationItem.hidesBackButton = true + vc.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Log Out", style: .Plain, target: self, action: "logout") vc.navigationItem.title = "Logged in as " + PFUser.currentUser().username } }