This is how you show this menu:
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel",
destructiveButtonTitle:nil
otherButtonTitles:@"Button 1", @"Button 2", @"Button 3", nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showInView:[self view]];
[actionSheet release];
In order to connect it to UIBarButtonItem
just point the bar button item to a selector that will include the code above.
Don't forget to implement - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
method of UIActionSheetDelegate
.