1

The default behavior for the UIActionSheet used to be that touching the background did not dismiss it, and in fact did nothing. But with iOS 7 touching the background is equivalent to pressing the cancelButton.

I'm modifying some software that needs to be kept to the iOS 6 behavior. How can I keep touches of the background from dismissing the action sheet?

Community
  • 1
  • 1
JohnK
  • 6,865
  • 8
  • 49
  • 75

1 Answers1

1

You can achieve this by not using a cancel button.

Check this SO post:

UIActionSheet in iOS7 dismissing when user taps ANYWHERE on the screen on iPhone

Community
  • 1
  • 1
Tarek Hallak
  • 18,422
  • 7
  • 59
  • 68
  • Ah, so you mean, setting `cancelButton: nil`, which still allows me to set the text for one of the custom buttons to `@"Cancel"`? Great solution. Thanks for the informative link too. – JohnK Oct 09 '13 at 13:29