iOS: Use Animator to control blur effect

This commit is contained in:
pengfei.zhou
2021-11-26 11:03:38 +08:00
committed by osborn
parent f302592d11
commit 7c9e13158d
3 changed files with 44 additions and 9 deletions

View File

@@ -29,6 +29,7 @@ - (UIView *)build {
UIView *ret = [super build];
UIVisualEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
self.visualEffectView = [[UIVisualEffectView alloc] initWithEffect:effect];
self.visualEffectView.userInteractionEnabled = NO;
[ret addSubview:self.visualEffectView];
self.visualEffectView.doricLayout.widthSpec = DoricLayoutMost;
self.visualEffectView.doricLayout.heightSpec = DoricLayoutMost;