This seems like an annoying inconsistency, but not something to fix the situation. This example assumes that you only need to show UIActionSheets , which seems random to you.
Here is an example of how to fix this starting with .h :
@interface TestToolBarExclusiveActionSheet : UIViewController <UIActionSheetDelegate>{ UIActionSheet *sheetShowing; } @property (weak, nonatomic) IBOutlet UIBarButtonItem *oneButton; @property (weak, nonatomic) IBOutlet UIBarButtonItem *twoButton; @end
and .m :
#import "TestToolBarExclusiveActionSheet.h" @implementation TestToolBarExclusiveActionSheet @synthesize oneButton; @synthesize twoButton; -(IBAction)targetForBothButtons:(UIBarButtonItem *)button{ if (sheetShowing != nil){ [sheetShowing dismissWithClickedButtonIndex:[sheetShowing cancelButtonIndex] animated:YES]; sheetShowing = nil; } else{
and finally a screenshot of .xib (shown in iPhone mode for image size):

Just plug in the button sockets and connect both button actions to the targetForBothButtons: method.
You will see that if one of the action sheets is displayed, pressing any button on the panel will dismiss the action sheet.
source share