I'm novice in iPhone development. Can anyone tell me how to dismiss UIActionSheet control when i tapped outside of it?
In my actionSheet i have only datePicker control and it pops up over tab bar control now what i want whenever user click outside of it, it should dismiss instead of using actionSheet's cancel button. Regards
An even more simpler solution would be to just add a Cancel button. This will automatically enable tap-background-to-dismiss: (Swift)
alertController.addAction(UIAlertAction(title: "Cancel",
style: .cancel,
handler: nil))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With