增加换肤功能

This commit is contained in:
启星
2025-08-14 09:40:25 +08:00
parent 8065693d4c
commit 9a6659045d
24 changed files with 446 additions and 79 deletions

View File

@@ -96,8 +96,16 @@
/// @param title
- (void)setTabBarImageUrl:(NSString *)imageUrl selectedImg:(nonnull NSString *)imageName title:(nonnull NSString *)title {
self.titleLbl.text = title;
[self.iconBtn setBackgroundImage:[UIImage imageNamed:imageUrl] forState:UIControlStateNormal];
[self.iconBtn setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateSelected];
if ([imageUrl hasPrefix:@"http"] || [imageUrl hasPrefix:@"https"]) {
[self.iconBtn sd_setBackgroundImageWithURL:[NSURL URLWithString:imageUrl] forState:UIControlStateNormal placeholderImage:nil];
}else{
[self.iconBtn setBackgroundImage:[UIImage imageNamed:imageUrl] forState:UIControlStateNormal];
}
if ([imageName hasPrefix:@"http"] || [imageName hasPrefix:@"https"]) {
[self.iconBtn sd_setBackgroundImageWithURL:[NSURL URLWithString:imageName] forState:UIControlStateSelected placeholderImage:nil];
}else{
[self.iconBtn setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateSelected];
}
}
- (void)heartAnimationWithView:(UIView*)view{