menuSection icon image compatibility
This commit is contained in:
1 parent
5c3a6de2b7
commit
79a075e338
8 files changed
+120
-17
No files matched your search
@@ -200,13 +200,17 @@
|
||||
|
||||
- (void)setSectionWithIcon:(UIImage *)icon andSize:(CGFloat)size{
|
||||
if (@available(iOS 13.0, *)) {
|
||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:size weight:UIImageSymbolWeightBold];
|
||||
UIImageSymbolConfiguration *config;
|
||||
if(icon.isSymbolImage) config = [UIImageSymbolConfiguration configurationWithPointSize:size weight:UIImageSymbolWeightBold];
|
||||
else{
|
||||
config = [UIImageSymbolConfiguration configurationWithPointSize:size];
|
||||
icon = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
||||
}
|
||||
_iconImageView.image = [icon imageWithConfiguration:config];
|
||||
|
||||
} else {
|
||||
_iconImageView.image = icon;
|
||||
}
|
||||
|
||||
_iconImageView.tintColor = [ThemeManager textColor];
|
||||
_iconImageView.hidden = (icon == nil);
|
||||
[self updateLayout];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user