我正在使用 ECSlidingViewController 进行菜单导航。我有一个选项注销,选择注销用户。当用户再次登录时,菜单栏将可见而不是隐藏。用于在注销选择时隐藏菜单栏的 Swift 代码。
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)
}
}
}