如何在iOS应用程序上为菜单创建模糊效果



我有一个应用。我要做的是当我点击按钮或条按钮项或一排桌子时,然后将出现一个带有两个项目的菜单,用户可以单击它以选择他们要选择的项目和背景该菜单的后面将变得模糊,直到选择一个物品为止。我尝试在cocoacontrols.com上搜索一个控件以处理该业务,但找不到任何东西。有任何建议执行此功能?

d

尝试这个

UIBlurEffect *blurEffect = [UIBlurEffect   effectWithStyle:UIBlurEffectStyleDark];
UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
blurEffectView.frame = self.view.bounds;
blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:blurEffectView];

这将产生与本机iPhone Blur效果一样的好模糊效果

最新更新