0422 Multi-threaded Downloads (category/class Extensions)/package Mysdwebimage

Source: Internet
Author: User
1. Create a taxonomy source-oc Files-Select Uiimageview to create category (category) 2. Create an object method in the taxonomy: What do I need to do to analyze the classification, and what parameters are needed? 1) Categories need to get URLs to download pictures 2) Categories need to pass in a picture, as placeholder so, define a method:-(void) My_ Sdwebimagewithurl: (nsurl*) URL placeholder: (uiimage*) placeholder; 3. Take the thread creation method from the original Viewdidload method. Accordingly, Downloadimage: methods, and Updateimageviewwithdata: methods are to be brought over. 4. According to the parameters obtained now, the original need to obtain the tag value of the place, do the corresponding changes. 1) Download the image method, pass the URL download nsdata data 2) Refresh the UI method, pass the data to refresh UI 5. Back to the Viewdidload method the original set of overthrow now to implement call a method to load the picture, refresh the UI. So you need to pass in the URL and a background map. So, the reverse first obtains the URL string, then creates the Nsurl object. [Myimgview my_sdwebimagewithurl:url placeholder:placeholdiage];//Note: Index self-increment to be placed in the For loop, the last face. 0422 Review _ morning _ multi-threaded simultaneous download pictures (category). Zip
35.5 KB

0422 Multi-threaded Downloads (category/class Extensions)/package Mysdwebimage

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.