Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no visible @interface for UIImageView declares the selector sd_setShowActivityIndicatorView and sd_setIndicatorStyle is not detected

It is very strange that sd_setImageWithURL is working but got an error in sd_setShowActivityIndicatorView:YES and sd_setIndicatorStyle.

Below what I have done.

[cell.cellImgView sd_setShowActivityIndicatorView:YES];
[cell.cellImgView sd_setIndicatorStyle:UIActivityIndicatorViewStyleGray];

[cell.cellImgView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://img.youtube.com/vi/%@/hqdefault.jpg",[[[galleryDic objectForKey:@"data"] valueForKey:@"Video_id"] objectAtIndex:indexPath.row]]] placeholderImage:[UIImage imageNamed:@"youtube-video"] ];

Please see the image below: enter image description here

like image 574
Abhishek Mitra Avatar asked Jun 01 '17 08:06

Abhishek Mitra


3 Answers

I figured it out now, Well I have to import #import "UIView+WebCache.h" too along with others then i have used following:

[cell.cellImgView sd_setShowActivityIndicatorView:YES];
[cell.cellImgView sd_setShowActivityIndicatorView:UIActivityIndicatorViewStyleGray];

Also, I removed the SDWebImage folder, what i used to integrate manually, then I have installed it through `POD' again, and now it is working as i wanted.

like image 51
Abhishek Mitra Avatar answered Nov 19 '22 11:11

Abhishek Mitra


For anybody who has this issue in 2019

sd_setShowActivityIndicatorView has been removed in SDWebImage v5

Use this instead

imageView1.sd_imageIndicator = SDWebImageActivityIndicator.gray
//or
imageView2.sd_imageIndicator = SDWebImageProgressIndicator.`default`
//or
imageView2.sd_imageIndicator = SDWebImageActivityIndicator.medium //large, small, gray ...
like image 8
Husam Avatar answered Nov 19 '22 10:11

Husam


I migrate to version 4.0.

and

#import <SDWebImage/UIView+WebCache.h>
like image 6
Yen-Sheng Wang Avatar answered Nov 19 '22 11:11

Yen-Sheng Wang