1

When i localized iOS app . UIImageView not showing images at all , These images i downloaded it from urls . NOTE: i am using AsyncImageView component .

@implementation CategoryView

+ (CategoryView *)getViewWithTitle:(NSString *)title andImageUrl:(NSString *)imgUrl {

    CategoryView *view = [[[NSBundle getBundle] loadNibNamed:@"CategoryView" owner:self options:nil] objectAtIndex:0];


    [view configureWithTitle:title andImageUrl:imgUrl];

    return view;
}

- (void)configureWithTitle:(NSString *)title andImageUrl:(NSString *)imgUrl {


    [self bringSubviewToFront:_viewBtn];

    self.imageView.layer.cornerRadius = self.imageView.frame.size.width / 2;
    self.imageView.clipsToBounds = YES;

    self.categoryTitleLabel.text = title;
    [self.imageView setImageURL:[NSURL URLWithString:imgUrl]];
}
Gabrail
  • 216
  • 2
  • 16
  • If you can post the code where you are downloading and setting UIImageview images – Yan Nov 03 '16 at 01:48

2 Answers2

0

As i know you want to access those images downloaded from url will show everytime once it will complete downloading Is it right?

If is like that then i would like to inform you that AsyncImageView only download images into cache asynchronously but it will not store images into disk for long time so you can not able to see images in offline mode into imageView,

for that you need to save all downloaded images into cache memory and need to fetch images from that,

You can use FastImageCache

Samkit Shah
  • 721
  • 1
  • 7
  • 18
0

You can try SDWebImage library and it provides an async image downloader with support to caching.

Some of the features listed in the documentation :

Categories for UIImageView, UIButton, MKAnnotationView adding web image and cache management

An asynchronous image downloader

An asynchronous memory + disk image caching with automatic cache expiration handling

A background image decompression

A guarantee that the same URL won't be downloaded several times

A guarantee that bogus URLs won't be retried again and again

A guarantee that main thread will never be blocked

Performances!

Use GCD and ARC

Illep
  • 16,375
  • 46
  • 171
  • 302