增加换肤功能
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user