mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-30 20:34:03 -04:00 
			
		
		
		
	Update LowContrastMode.xm
This commit is contained in:
		| @@ -156,29 +156,25 @@ static BOOL pinkContrastMode() { | ||||
|     %orig(textColor); | ||||
| } | ||||
| %end | ||||
| /* disabled the code to stop crashing | ||||
| /* disabled the code, not sure if this will work | ||||
| %hook _ASDisplayView | ||||
| - (void)didMoveToWindow { | ||||
|     %orig;  | ||||
|     UILabel *label = [self findLabelInSubviews:self.subviews]; | ||||
|     if (label) { | ||||
|         [self customizeLabel:label]; | ||||
|     } | ||||
| } | ||||
| - (UILabel *)findLabelInSubviews:(NSArray *)subviews { | ||||
|     for (UIView *subview in subviews) { | ||||
|         if ([subview isKindOfClass:[UILabel class]]) { | ||||
|             return (UILabel *)subview; | ||||
|     if ([self isKindOfClass:NSClassFromString(@"ASDisplayNode")]) { | ||||
|         UILabel *titleLabel = [self valueForKey:@"accessibilityLabel"]; | ||||
|         UIView *superview = [self valueForKey:@"superview"]; | ||||
|         if ([titleLabel isKindOfClass:[UILabel class]]) { | ||||
|             titleLabel.textColor = [UIColor whiteColor]; | ||||
|         }  | ||||
|         UILabel *label = [self findLabelInSubviews:subview.subviews]; | ||||
|         if (label) { | ||||
|             return label; | ||||
|         if ([superview isKindOfClass:[UIView class]]) { | ||||
|             for (UIView *subview in superview.subviews) { | ||||
|                 if ([subview isKindOfClass:[UILabel class]]) { | ||||
|                     UILabel *textView = (UILabel *)subview; | ||||
|                     textView.textColor = [UIColor whiteColor]; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     return nil; | ||||
| } | ||||
| - (void)customizeLabel:(UILabel *)label { | ||||
|     label.textColor = [UIColor whiteColor]; | ||||
| } | ||||
| %end | ||||
| */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 arichorn
					arichorn