退出登录警告框
func logOutWithAlert() {
let alertController = UIAlertController (title: "温馨提示",message:"确定要退出吗?",preferredStyle:.alert)
let cancelAction = UIAlertAction (title: "取消",style:.cancel,handler:{action in
HJPrint (message:"点击了取消")
})
let okAction = UIAlertAction (title:"确定" , style:.default,handler: {action in
HJPrint (message:"点击了确定")
AccountService.shared.signOut()
Notification.Name.didLogout.post()
FBTrackingService.sendData("", parameters: ["code" : FBTrackingRefs.OS_mine_exit])
})
alertController.addAction(cancelAction)
alertController.addAction(okAction)
self.present(alertController, animated: true , completion:nil )
}
网友评论