Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Use SDWebImage SDK for image caching in Objective C

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 5.82k
    Comment on it

    Best approach for Image loading in iOS apps
    Best way to load Images in iOS apps than image sync.


    Download SDWebImage framework and Unzip it.
    **Steps to follow**:-


    Step 1. Add SDWebImage framework into your project. On Project navigator Click>>Project then
    Step 2. Click >> Target >> Build Phases.
    Step 3. Click>> Link Binary with Libraries.
    Step 4. Click >> '+' button.
    Step 5. Click Add other
    Step 6. Select SDWebImage folder.
    Step 7. In your xcode file include framework


    #import <SDWebImage/UIImageView+WebCache.h>
    

    Step 8.

    [imageView setImageWithURL:[NSURL URLWithString:imageURL objectAtIndex:indexPath.row]] placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
    

    Incase you want to refresh or reload images then execute the below code...

    [[[SDWebImageManager sharedManager] imageCache] clearDisk];
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: