Sclalertview-swift: programmatically dismiss an alert?

Created on 18 Jul 2016  路  3Comments  路  Source: vikmeup/SCLAlertView-Swift

is there a way to programmatically dismiss an alert? not autodismiss, we have an external trigger we capture and would like the alert to respond as well.

Most helpful comment

Hi all, can we now close this? Just dropping by to tell you all that I've spent like 2 nights dismissing the alert. I've been tracking my screen hierarchies, doing child.removeFromParentViewController(), alert.dismissViewController..... OMG. Maybe we should include this hideView() in the documentation? Thanks.

All 3 comments

The various show... methods (showTitle, showError, etc) return an instance of SCLAlertViewResponder. Store that object and call its close method when you want to dismiss the alert.

let alert = SCLAlertView()
alert.hideView() 

Hi all, can we now close this? Just dropping by to tell you all that I've spent like 2 nights dismissing the alert. I've been tracking my screen hierarchies, doing child.removeFromParentViewController(), alert.dismissViewController..... OMG. Maybe we should include this hideView() in the documentation? Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

p0tvin29 picture p0tvin29  路  3Comments

rayhk6 picture rayhk6  路  29Comments

jlaws picture jlaws  路  19Comments

samigehi picture samigehi  路  4Comments

ossmalpha picture ossmalpha  路  16Comments