Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get those small views from the bottom to appear in iOS SDK?

I'n talking about the small windows with buttons that come from the bottom when you need to confirm some action. For example, if you want to delete a photo from an album and press the trash icon, a small view jumps from the bottom and asks if you want to delete the photo or cancel

How do I get those views to appear?

like image 491
WhiteTiger Avatar asked Apr 07 '11 02:04

WhiteTiger


1 Answers

Use a UIActionSheet.

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Some Action"
                                           delegate:self 
                                  cancelButtonTitle:@"Cancel"
                             destructiveButtonTitle:@"OK"
                                  otherButtonTitles: nil];

actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showInView:self.view];
[actionSheet release];
like image 183
Terry Wilcox Avatar answered Nov 15 '22 02:11

Terry Wilcox