iOS--Image download for cell

Source: Internet
Author: User

1. Face Questions

1> How to prevent a URL corresponding to the picture repeated download

* "Cell download Picture idea – there is a sandbox cache"

What is the default cache duration for 2> sdwebimage?

* 1 weeks

3> Sdwebimage How does the bottom layer come true?

* Class ppt "Cell download Picture ideas – there is a sandbox cache"

2.SDWebImage

1> Common methods

-(void) Sd_setimagewithurl: (nsurl *) URL placeholderimage: (UIImage *) placeholder;

-(void) Sd_setimagewithurl: (nsurl *) URL placeholderimage: (UIImage *) placeholder options: (sdwebimageoptions) options;

-(void) Sd_setimagewithurl: (nsurl *) URL placeholderimage: (UIImage *) placeholder completed: ( Sdwebimagecompletionblock) Completedblock;

-(void) Sd_setimagewithurl: (nsurl *) URL placeholderimage: (UIImage *) placeholder options: (sdwebimageoptions) options Progress: (Sdwebimagedownloaderprogressblock) Progressblock completed: (sdwebimagecompletionblock) CompletedBlock;

2> Memory Processing: When the app receives a memory warning

/**

* When the app receives a memory warning

*/

-(void) applicationdidreceivememorywarning: (uiapplication *) application

{

Sdwebimagemanager *mgr = [Sdwebimagemanager Sharedmanager];

1. Cancel the operation being downloaded

[Mgr Cancelall];

2. Clear the Memory cache

[Mgr.imagecache Clearmemory];

}

3> sdwebimageoptions

* sdwebimageretryfailed: After the download fails, it will be automatically re-downloaded

* Sdwebimagelowpriority: Automatically pauses some internal download operations while UI interaction is in progress

* sdwebimageretryfailed | Sdwebimagelowpriority: Has the above 2 functions

iOS--Image download for cell

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.