gpt4 book ai didi

ios - 在背景 iOS 的 ImageView 中模糊图像

转载 作者:行者123 更新时间:2023-11-29 12:25:08 28 4
gpt4 key购买 nike

我想将 ImageView 放在窗口的背景上,在 ImageView 上方我放置了透明的表格 View 。我希望​​背景中的图像模糊。谢谢..

最佳答案

在 iOS 8 中,您可以使用 UIVisualEffect 来模糊 View

UIVisualEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];// explore other effects too
UIVisualEffectView *visualEffectView =[[UIVisualEffectView alloc] initWithEffect:blurEffect];
visualEffectView.frame = YOURFRAME; // set frame
[visualEffectView setAlpha:1.0];// set as you like
[YOURVIEW addSubview:visualEffectView]; //add on your view where you want

关于ios - 在背景 iOS 的 ImageView 中模糊图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29368711/

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