okmr-d / DOAlertController

Simple Alert View written in Swift, which can be used as a UIAlertController. (AlertController/AlertView/ActionSheet)
MIT License
405 stars 68 forks source link

Touch outside the Alert to dismiss? #18

Open eeschimosu opened 8 years ago

eeschimosu commented 8 years ago

Is it possible to touch outside the box and the alert to dismiss at this poit?

misuqian commented 8 years ago
// Handle ContainerView tap gesture
func handleContainerViewTapGesture(sender: AnyObject) {

// cancel action let action = actions[cancelButtonTag - 1] as! DOAlertAction if (action.handler != nil) { action.handler(action) } self.dismissViewControllerAnimated(true, completion: nil) }