Reputation: 875
I'm reading through the apple developer library and would like to use a submenu like apple shows in a picture:
First question: Is that a modal view? And if yes, how to create something like that? Does this submenu has its own controller and view or is all that declared in the view above? I'm using storyboard.
Upvotes: 0
Views: 658
Reputation: 21221
Nope this is an UIActionSheet
, it does not have a nib file or a class file, you use it like this
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Title"
delegate:self
cancelButtonTitle:@"cancel"
destructiveButtonTitle:nil
otherButtonTitles: nil];
[sheet showInView:self.view];
//Function gets called when user taps on a button
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
}
Upvotes: 2