lenhhoxung
lenhhoxung

Reputation: 2776

Strange color in UIActionSheet

Today I added one UIActionSheet to my project and it displayed very strangely:

enter image description here

As you can see, the action sheet displays only text - no buttons - and the background is completely black. I just want to have default style of UIActionSheet on my app.

I'm using Storyboards and here is the code to present the action sheet:

UIActionSheet *_actionSheet = [[[UIActionSheet alloc] initWithTitle:LocStr(@"Cell_TellFriend_Key") delegate:self cancelButtonTitle:LocStr(@"Cancel_Key") destructiveButtonTitle:nil otherButtonTitles:LocStr(@"EmailShare_Key"),LocStr(@"FacebookShare_Key"),LocStr(@"TwitterShare_Key"),nil] autorelease];

_actionSheet.actionSheetStyle = UIActionSheetStyleDefault;

AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
[_actionSheet showFromTabBar:appDelegate.tabbarCtrl.tabBar];

What am I doing wrong? How can I fix this?

Upvotes: 0

Views: 136

Answers (1)

Phantomcho
Phantomcho

Reputation: 302

_actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;

Upvotes: 1

Related Questions