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

fatal error: Array index out of range on actionsheet on tap gesture #16

Open kohdesmond opened 8 years ago

kohdesmond commented 8 years ago

I have an array of 5, cancelButtonTag is 6, hence fatal error: Array index out of range

// Handle ContainerView tap gesture func handleContainerViewTapGesture(sender: AnyObject) { // cancel action let action = actions[cancelButtonTag] as! DOAlertAction if (action.handler != nil) { action.handler(action) } self.dismissViewControllerAnimated(true, completion: nil) }

jkyeo commented 7 years ago

the same error when tap outside of the window

astrokin commented 7 years ago

@kohdesmond @jkyeo seems that it was fixed in latest release. 2.0 version