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