objective-c - 没有背景着色的 UIActionSheet

标签 objective-c ios uiview transparent uiactionsheet

所以我读了this post

但它似乎没有处理使背景不着色为半透明的问题。我希望带有按钮的菜单后面的内容清晰可见。这可能吗?

这是我目前拥有的

WPSActionSheet *actionSheet = [[WPSActionSheet alloc] initWithCompletion:completion];
  [actionSheet setTitle:@""];
  [actionSheet addButtonWithTitle:@"Take Photo"];
  [actionSheet addButtonWithTitle:@"Choose from Library"];
  [actionSheet addButtonWithTitle:@"Skip This Step"];
  [actionSheet setCancelButtonIndex:2];
  [actionSheet showInView:[self view]];

这表明了这一点

enter image description here

最佳答案

UIActionSheet 将始终显示“有色背景”。没有办法解决这个问题。但是,您可以使用 UIView 创建您自己的 UIActionSheet 版本。

关于objective-c - 没有背景着色的 UIActionSheet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11477410/

相关文章:

ios - 带有 collectionViewCell 的核心数据子类

objective-c - 什么是回调处理程序

ios - 有没有办法在 SpriteKit 中绘制像素?

ios - 在 UIView 中加载 MKMapView

ios - 向 UIScrollView 中的标准 Pan Gesture Recognizer 添加功能

ios - 在 viewDidLayoutSubviews 中更改框架

ios - 如何更改 UIPageViewController 中的按钮名称

iphone - 如何编写测试用例?

ios - 来自 MTLBuffer 问题的 MTLTexture

objective-c - 如何在 iOS Facebook 应用程序上加载 Facebook 页面链接