Check whether there is a UITabBar or UIToolbar below it. The problem is that most likely you try to show actionSheet as subview of your current view, which starts only above tabs and toolbar. However since actionSheet is always shown attached to bottom of the screen, you will miss taps outside your view.
The fix is to show your actionSheet in the whole application window, instead of subview of your current view:
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Button", nil];
[actionSheet showInView:[UIApplication sharedApplication].keyWindow];
[actionSheet release];
Did have this problem long time ago. Thanks for sharing.
ReplyDeleteYou saved me! Thanks a lot.
ReplyDeleteI had problem adding UIActionSheet in self.view when the view is in UIScrollView. Tried your solution. It worked great! :-) Thanks a lot!
ReplyDelete