I have a UIBarButtonItem
in a navigation item that displays a UIActionSheet
with a button to toggle a quick setting:
The action sheet is presented from the button item:
[calendarSettingsSheet showFromBarButtonItem:self.navigationItem.leftBarButtonItem animated:YES];
However, here's the problem I'm encountering:
When I tap below the navigation bar, for example anywhere in the calendar, the UIActionSheet
dismisses, which is expected. Any touch outside the sheet, in my opinion, should dismiss it.
But: I can still tap on the "Settings" and "Done" buttons in the navigation bar, and not only is the action sheet not dismissed, but the buttons function.
So, tapping "Settings" while the UIActionSheet
is open, causes another to be opened. This can easily be avoided by checking to see if the action sheet is already open.
But, the "Done" button dismisses the entire calendar view, leaving the UIActionSheet
hovering over the view that originally presented the calendar.
Is this intended behavior? While I could disable the buttons when the action sheet is presented, and enable them when it's dismissed, this seems like an unnecessary workaround.