I have an alert view which the user get when they press the logout button where they can either choose to log out or cancel however with the alert view active if i leave the app and come back(without killing the app) the alert view disappears but i want it to be still active as the user hasn't chosen cancel or logout yet. is there a way to achieve this? thanks
Well i didn't think putting my code was necessary in this scenario, anyway here's what my function looking like
func displayLogOutAlert() {
let alert = PCLBlurEffectAlert.Controller(title: nil, message: nil, effect: UIBlurEffect(style: .light), style: .actionSheet)
let alertBtnYes = PCLBlurEffectAlert.Action(title: "Log Out", style: .destructive, handler: { (action) in
alert.dismiss(animated: true, completion: nil)
FBSDKLoginManager().logOut()
GIDSignIn.sharedInstance().signOut()
self.logoutIndicator.startAnimating()
self.performSegue(withIdentifier: "backToLogin", sender: self)
})
let alertBtnCancel = PCLBlurEffectAlert.Action(title: "Cancel", style: .cancel, handler: nil)
//self.presentingViewController?.dismiss(animated: true, completion: nil)
alert.addAction(alertBtnYes)
alert.addAction(alertBtnCancel)
//setting button/text properties
alert.configure(cornerRadius: 10)
alert.configure(buttonBackgroundColor: UIColor.white)
alert.configure(buttonHeight: 55)
alert.configure(buttonFont: [.destructive: UIFont.systemFont(ofSize: 20), .cancel: UIFont.boldSystemFont(ofSize: 20)])
alert.show()
}