I am using ECSlidingViewController for the menu navigation. I have a option logout on which on selection logout the user. When the user login agin the menu bar will be visible instead of hidden. Swift code to hide the menu bar on logout selection.
import Foundation
import UIKit
import Parse
class MenuTableViewController: UITableViewController {
@IBAction func unwindToMenuViewController(segue: UIStoryboardSegue) {
}
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if indexPath.row == 4 {
PFUser.logOut()
var loadLoginPage: UINavigationController = self.storyboard?.instantiateViewControllerWithIdentifier("LoginNavigationController")! as UINavigationController
self.presentViewController(loadLoginPage, animated: false, completion: nil)
}
}
}