在 Android 下进行实时模糊渲染
模糊渲染
模糊渲染能生动地表达内容间的层次感。当专注于当前特定内容的时候,它允许用户维持相对的上下文,即使模糊层下面的内容发生了视差移动或者动态变化。
在IOS开发中,我们首先可以通过构造UIVisualEffectView获得这种模糊效果:
UIVisualEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
接着我们可以添加visualEffectView到视图层中,那么在它之下的内容都会动态渲染模糊