Reputation: 1681
My UIActionSheet
is transparent when it displays. How do I change this? here's a screenshot of what the problem looks like:
the code:
- (IBAction)btnTakePicture_Clicked:(id)sender
{
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Image from..." delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Camera", @"Image Gallary", nil];
actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
actionSheet.alpha=0.90;
actionSheet.tag = 1;
[actionSheet showInView:self.view];
UIButton *btn = (UIButton *)sender;
intButton = btn.tag;
}
Upvotes: 3
Views: 2028
Reputation: 4503
Removing the lines:
actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
actionSheet.alpha=0.90;
Should do the trick
Upvotes: 2
Reputation: 108101
I believe what's causing problems is
actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
Probably in iOS 7 this causes the transparency. Try removing it.
Also you are setting the alpha to 0.9, which will cause some transparency in any case (not as showed in the screenshot though). If you want a completely opaque action sheet, remove also
actionSheet.alpha=0.90;
Upvotes: 3