UIActionSheet cancel button not dismissing actionsheet

爷,独闯天下 提交于 2019-12-03 12:24:33
nevan king

Try this

[actionSheet showInView:[self.view window]];

UIActionSheet cancel button strange behaviour

This Will do the trick

[actionSheet showInView:[self.view window]];

instead of

[actionSheet showInView:self.view];

use

[actionSheet showFromTabBar:[[self tabBarController] tabBar]];

instead of

[actionSheet showInView:self.view];

this is working fine.. :-)

You need to display from a taskbar or a toolbar on iPhone as it clips some of the controls if you use display in view.

write simplite code

 actionSheet.actionSheetStyle = UIActionSheetStyleDefault;

this work fine

Read Q

I found the answer here.

https://stackoverflow.com/a/1530259/1803218

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