Add experimental blur

This commit is contained in:
Ali
2023-07-01 01:38:28 +02:00
parent 3fb24f79e2
commit f3067392d9
4 changed files with 48 additions and 4 deletions

View File

@@ -24,3 +24,5 @@ void applySmoothRoundedCornersImpl(CALayer * _Nonnull layer);
@end
UIView<UIKitPortalViewProtocol> * _Nullable makePortalView(bool matchPosition);
NSObject * _Nullable makeBlurFilter();

View File

@@ -200,3 +200,13 @@ UIView<UIKitPortalViewProtocol> * _Nullable makePortalView(bool matchPosition) {
return nil;
}
}
@protocol GraphicsFilterProtocol <NSObject>
- (NSObject * _Nullable)filterWithName:(NSString * _Nonnull)name;
@end
NSObject * _Nullable makeBlurFilter() {
return [(id<GraphicsFilterProtocol>)NSClassFromString(@"CAFilter") filterWithName:@"gaussianBlur"];
}