Showing a UIActionSheet

一笑奈何 提交于 2019-12-01 04:09:14

You need to reference the controllers view:

[actionSheet showInView:self.viewController.view]

If you attempt to show the UIActionSheet on the window though you use TabBar or ToolBar UI, The bottom part of the ActionSheet doesn't respond to your touch. You'd be better to use as follows:

[[[UIApplication sharedApplication] delegate] window];

or you can show it in the main window. it will be useful if you have a tabbar application.

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