diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index c6270b2..a9aacf2 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -119,7 +119,7 @@ static int getNotificationIconStyle() { %end %end -// YTHidePlayerButtons 1.0.0 - made by @aricloverEXTRA +// YTHidePlayerButtons 1.0.1 - v20.02.3+ - made by @aricloverEXTRA static NSDictionary *HideToggleMap(void) { static NSDictionary *map = nil; static dispatch_once_t onceToken; @@ -205,6 +205,18 @@ static BOOL inspectAndHideIfMatch(id view) { } return NO; } +static void removeViewFromSuperview(id view) { + if (!view) return; + dispatch_async(dispatch_get_main_queue(), ^{ + @try { + if ([view respondsToSelector:@selector(removeFromSuperview)]) { + [view removeFromSuperview]; + } + } @catch (NSException *ex) { + NSLog(@"[HidePlayerButtons] removeFromSuperview exception: %@", ex); + } + }); +} static void traverseAndHideViews(UIView *root) { if (!root) return; @try {