iphone - UIActionSheet 中的奇怪颜色

标签 iphone ios cocoa-touch uikit uiactionsheet

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

enter image description here

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

我正在使用 Storyboard ,以下是呈现操作表的代码:

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

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

最佳答案

_actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;

关于iphone - UIActionSheet 中的奇怪颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16556902/

相关文章:

ios - 在 Cocoa Touch 中实现去抖动/合并模式,例如 `layoutSubviews`

cocoa-touch - 让对象淡入淡出

c# - MonoTouch 中的事件变为空

ios - UIPageViewController 显示层级

iphone - iOS 模拟器和实际设备中的 bundle 行为不同

ios - Instagram hooks 预选媒体问题

ios - 动画 transform.scale 与 UIViewAnimationOptionBeginFromCurrentState 不按预期工作

iphone - 如何禁用WebView的上下文菜单?

Java IDE *在* iPhone 上?

iphone - 代码中核心数据简单关系