Reputation:
For some reason the top half of the my action sheet is not opaque. I have created the view and action sheet using the code below:
//allocate the view
self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
UIActionSheet *popupQuery = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Take a Picture",@"Select a Picture",nil];
popupQuery.delegate= self;
[popupQuery setOpaque:NO];
popupQuery.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[popupQuery showInView:self.tabBarController.view];
[popupQuery release];
I then tried to fix the problem by setting the opacity of the underlying view with the code below, but that didn't help either.
[self.view setBackgroundColor: color];
UIColor *color = [[UIColor alloc] initWithRed:0.0 green:0.0 blue:0.0 alpha:0.5];
Any suggestions? The top half of the action sheet is a dark grey.
Upvotes: 0
Views: 889
Reputation: 14816
Do you mean the overlay above the actual buttons (the top half of the screen), as in the screen at the left side of this image?
That's not supposed to be opaque. Is there some particular reason why it needs to be in your application? If you do need full coverage, perhaps a modal view controller, rather than an action sheet, would be appropriate?
Upvotes: 1