How can I keep UIActionSheet from being dismissed when background touched?

孤人 提交于 2019-12-11 06:00:03

问题


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?


回答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



来源:https://stackoverflow.com/questions/19254560/how-can-i-keep-uiactionsheet-from-being-dismissed-when-background-touched

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!