Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display UIActionSheet just below top navigation status bar on iPhone

I would like to display an action sheet sliding from just below the very top status bar.

When I use the navigationBar as the view to show in, the sheet is still displayed at the bottom of the screen. How can I show it originating from the top instead?

The class I'm calling the following code from is a 'UIViewController'

UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Hello" delegate:nil 
          cancelButtonTitle:nil 
          destructiveButtonTitle:nil 
          otherButtonTitles:nil];

UINavigationBar *navBar = self.navigationController.navigationBar;

[sheet showInView:navBar];

I've seen some apps show a sliding out drawer of some sort from where the status bar is.(eg: Twitterrific) How is this done?

like image 976
Alexi Groove Avatar asked Jan 14 '10 18:01

Alexi Groove


1 Answers

Apple has stated that they simply would like all action sheets to work the same way and slide in from the same direction. Hence there is no advertised way to easily manipulate their animations and such.

like image 174
Jaanus Avatar answered Oct 04 '22 02:10

Jaanus