我需要对自定义视图进行模糊效果,并且看起来与3D touch一样。
PS:我没有发现UIVisualEffectView支持这种效果。我们的系统只支持三个UIBlurEffectStyle,这与3D touch不同。
提前THX答案 0 :(得分:0)
请为customView的backgroundView添加以下代码...
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];// you have a list of options for UIBlurEffectStyle
UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
blurEffectView.frame = self.view.bounds; // Make your own frame
blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; // Skip this line if you are using new style of coding
[bgImageV addSubview:blurEffectView];