From 8f1d16746f2b50acc5b344ef9b5f86666019e8ba Mon Sep 17 00:00:00 2001 From: level3tjg Date: Tue, 5 Sep 2023 09:58:49 -0400 Subject: [PATCH] check for key on correct class --- uYouPlus.xm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uYouPlus.xm b/uYouPlus.xm index 6f97767..fa9b3e2 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -648,8 +648,9 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: %hook UITableViewCell - (void)_layoutSystemBackgroundView { %orig; - NSString *backgroundViewKey = class_getInstanceVariable(self.class, "_colorView") ? @"_colorView" : @"_backgroundView"; - ((UIView *)[[self valueForKey:@"_systemBackgroundView"] valueForKey:backgroundViewKey]).backgroundColor = [UIColor blackColor]; + UIView *systemBackgroundView = [self valueForKey:@"_systemBackgroundView"]; + NSString *backgroundViewKey = class_getInstanceVariable(systemBackgroundView.class, "_colorView") ? @"_colorView" : @"_backgroundView"; + ((UIView *)[systemBackgroundView valueForKey:backgroundViewKey]).backgroundColor = [UIColor blackColor]; } - (void)_layoutSystemBackgroundView:(BOOL)arg1 { %orig;