UIActionSheet中的奇怪颜色

时间:2013-05-15 04:31:20

标签: iphone ios cocoa-touch uikit uiactionsheet

今天我在项目中添加了一个UIActionSheet,它显示得非常奇怪:

enter image description here

如您所见,操作表仅显示文本 - 没有按钮 - 并且背景完全是黑色。我只想在我的应用程序上使用UIActionSheet的默认样式。

我正在使用故事板,这是展示行动表的代码:

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];

我做错了什么?我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

_actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;