Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing a UIActionSheet

I was wondering how to show a UIActionSheet from the bottom of the screen. I have tried using the showInView: method with MainView as the view to show it in but I get the MainView Undeclared error.

like image 260
Mark Szymanski Avatar asked Nov 09 '09 16:11

Mark Szymanski


3 Answers

You need to reference the controllers view:

[actionSheet showInView:self.viewController.view]
like image 69
ennuikiller Avatar answered Sep 19 '22 08:09

ennuikiller


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];

like image 42
KatokichiSoft Avatar answered Sep 18 '22 08:09

KatokichiSoft


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

[[[UIApplication sharedApplication] delegate] window];
like image 36
Morion Avatar answered Sep 18 '22 08:09

Morion