我在ios移动应用程序中有登录/注册屏幕,这是用ViewController视图编写的。我将左侧菜单设置为UITableview
,当我按下菜单中的注销时,我希望从当前用户分配注销(使用解析)。我使用此代码从左侧菜单进行事务处理,登录/注册后登录到当前用户并使用以下命令停止mapkit中的更新位置:
locationManager.stopUpdatingLocation()
let centerViewController = self.storyboard?.instantiateViewController(withIdentifier: "ViewController") as! ViewController
let centerNavController = UINavigationController(rootViewController: centerViewController)
let appDelegate:AppDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.centerContainer!.centerViewController = centerNavController
appDelegate.centerContainer!.toggle(MMDrawerSide.left, animated: true, completion: nil)
locationManager.stopUpdatingLocation()
PFUser.logOut()
我在退出时输出错误:
请问哪里错了?