gpt4 book ai didi

ios - 如何像 UIAlertView, iOS 那样提供不活动的背景效果?

转载 作者:行者123 更新时间:2023-11-29 11:09:24 26 4
gpt4 key购买 nike

我想让 View 像下面给出的 UIAlertView 中的效果一样不活动和变暗,我希望在从 url 加载 json 时发生。中间会有一个事件指示器移动。

enter image description here

最佳答案

其实很简单。尝试类似以下示例的操作。请务必将其添加为所有其他 View 下方的 subview 。

UIView * modalBackground = [[UIView alloc] initWithFrame:self.view.bound];
[modalBackground setBackgroundColor: [UIColor blackColor]];
[modalBackground setAlpha: 0.5];

关于ios - 如何像 UIAlertView, iOS 那样提供不活动的背景效果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12209205/

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