-1
我使用SWRevealViewControllerSWRevealViewController零誤差
當我點擊後退按鈕獲取此錯誤
fatal error: unexpectedly found nil while unwrapping an Optional value
我的代碼
let nesne:SWRevealViewController = self.revealViewController()//the error here
let mainStroyBoard:UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let desController = mainStroyBoard.instantiateViewController(withIdentifier: "MessageViewController") as! MessageViewController
let newFrontViewController = UINavigationController.init(rootViewController:desController)
nesne.pushFrontViewController(newFrontViewController, animated: true)