We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
- (void)py_addToThemeColorPool:(NSString *)propertyName { // 如果对象为_UIAppearance,直接返回 Class appearanceClass = NSClassFromString(@"_UIAppearance"); if ([self isMemberOfClass:appearanceClass]) return; // 键:对象地址+属性名 值:对象 NSString *pointString = [NSString stringWithFormat:@"%p%@", self, propertyName]; // 采用NSMapTable存储对象,使用弱引用 NSMapTable *mapTable = [NSMapTable mapTableWithKeyOptions:NSMapTableCopyIn valueOptions:NSMapTableWeakMemory]; [mapTable setObject:self forKey:pointString]; // 判断是否已经在主题色中 if (![[self themeColorPool] containsObject:mapTable]) { // 不在主题色池中 [[self themeColorPool] addObject:mapTable]; if (_currentThemeColor) { // 已经设置主题色,直接设置 [self setValue:_currentThemeColor forKey:propertyName]; } } }
这里面的mapTable每次都是新创建的吧,不需要判断吧?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这里面的mapTable每次都是新创建的吧,不需要判断吧?
The text was updated successfully, but these errors were encountered: