From 4d1b080a669508f87f50995881b2770f608fb46c Mon Sep 17 00:00:00 2001 From: hsz Date: Sat, 13 Jan 2024 11:23:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E6=89=BF=E9=93=BE=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E8=A6=86=E7=9B=96=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MJExtension/NSObject+MJProperty.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MJExtension/NSObject+MJProperty.m b/MJExtension/NSObject+MJProperty.m index 71b08f4..15c020d 100644 --- a/MJExtension/NSObject+MJProperty.m +++ b/MJExtension/NSObject+MJProperty.m @@ -79,7 +79,10 @@ + (id)mj_propertyKey:(NSString *)propertyName // 查看有没有需要替换的key if ((!key || [key isEqual:propertyName]) && [self respondsToSelector:@selector(mj_replacedKeyFromPropertyName)]) { - key = [self mj_replacedKeyFromPropertyName][propertyName]; + [self mj_enumerateAllClasses:^(__unsafe_unretained Class c, BOOL *stop) { + key = [c mj_replacedKeyFromPropertyName][propertyName]; + if (key) *stop = YES; + }]; } if (!key || [key isEqual:propertyName]) {