iOS 26.1 implementation of liquidGlass overlay (#4921)

This commit is contained in:
mark.dev
2026-03-23 11:19:59 +02:00
committed by GitHub
parent d80e563771
commit 7bd918988f
@@ -25,6 +25,15 @@ static BOOL __currentlyDrawing = NO;
static BOOL __subviewFound = NO;
static UIView* __subview = nil;
static BOOL _dtx_isLiquidGlassOverlay(UIView* view)
{
if (!view) return NO;
NSString* className = NSStringFromClass([view class]);
return ([className containsString:@"PlatterGlass"] ||
[className containsString:@"PlatterAnimation"] ||
[className containsString:@"PlatterContent"]);
}
static void (*__orig_VKMapView_renderInContext)(id self, SEL _cmd, CGContextRef ctx);
+ (void)_dtx_applyDrawingFixes
{
@@ -125,6 +134,10 @@ static void (*__orig_VKMapView_renderInContext)(id self, SEL _cmd, CGContextRef
if(__subviewFound == YES)
{
if(_dtx_isLiquidGlassOverlay(delegate))
{
return;
}
__orig_CALayer_renderInContext(self, _cmd, ctx);
return;
}
@@ -158,6 +171,11 @@ static void (*__orig_VKMapView_renderInContext)(id self, SEL _cmd, CGContextRef
return;
}
if(_dtx_isLiquidGlassOverlay(delegate))
{
return;
}
__orig_CALayer_something(self, _cmd, ctx);
}));
}