gpt4 book ai didi

ios - iPhone 中的 presentViewController 时如何保持背景透明?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:41:36 24 4
gpt4 key购买 nike

我想像 iPhone iOS6 中的 UIActivityController 一样保持背景透明 enter image description here

我尝试清除颜色和不透明但背景总是黑色像这样(iPhone iOS5 模拟器)

enter image description here

这是 presentViewController 代码:

    ShareViewController *controller = [[ShareViewController alloc] initWithNibName:@"ShareViewController_iPhone" bundle:nil];
controller.delegate = self;

[self presentViewController:controller animated:YES completion:^{
NSLog(@"Activity complete");
}];

求助!谢谢!

最佳答案

看看你要做的是在你提到的自定义 UIActionsheet 后面添加一个 UIView 。在这里,您可以做的是将 UIView 的背景颜色保持为白色,然后保持其 alpha = 0.5。

当您关闭 UIActionsheet 时,您也可以removeFromSuperview 添加在后面的 UIView

关于ios - iPhone 中的 presentViewController 时如何保持背景透明?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18009084/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com