[:en]Solution: ViewDidAppear
override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) // Check login status let defaults = NSUserDefaults.standardUserDefaults() if let loginstatus = defaults.stringForKey("loginkey"){ print("loginstatus: \(loginstatus)") if (loginstatus == "in"){ } }else { // Call Button self.logoutbTn(logoutDisplay) }
[:]