开发者

UIView: how to restrict touches to it exclusively

开发者 https://www.devze.com 2023-01-04 03:02 出处:网络
I want to display a modal dialog i.e. user should not be able to touch anything under it, unless he dismisses the dialog first. [self setExclusiveTouch:YES] doesn\'t seem to help, user can still 开发者

I want to display a modal dialog i.e. user should not be able to touch anything under it, unless he dismisses the dialog first. [self setExclusiveTouch:YES] doesn't seem to help, user can still 开发者_JS百科click the buttons below the dialog.

any ideas?


One way could be to place a transparent UIView below your modal dialog view, sized as the UIWindow and with userInteractionEnabled set to NO.

0

精彩评论

暂无评论...
验证码 换一张
取 消