SCLAlertView-Swift
SCLAlertView-Swift copied to clipboard
Dismiss the alert on Close button
I don't want to auto dismiss the alert as I have two buttons and don't want to dismiss the alert on both. So I have set shouldAutoDismiss as false.
This is the Close button :
self.alert.addButton("Close", backgroundColor: Constants.kThemeRedColor, textColor: UIColor.white, showDurationStatus: false) {
self.alert.dismiss(animated: true, completion: nil)
}
But the alert is not dismissing.
Try with self.alert.hideView. I have working code like this:
backgroundColor: Colors.Yellow,
textColor: .white,
showDurationStatus: false) {
alert.hideView()
}