"iOS development" about the use of third-party framework sdwebimage for picture loading

Source: Internet
Author: User

Sdwebimage is a third-party framework for loading network pictures, and some other good features

Use steps


Https://github.com/rs/SDWebImage

Download after decompression, decompression is

Then drag the Sdwebimage folder in the file to your project and use it in your project

Working with Frames
#import "sdwebimage/uiimageview+webcache.h"//Introduction header file-(UITableViewCell*) TableView: (UITableView*) TableView Cellforrowatindexpath: (Nsindexpath*) Indexpath {Static NSString*id = @"Video";UITableViewCell*cell = [TableView dequeuereusablecellwithidentifier:id];if(Cell = =Nil) {cell = [[UITableViewCellAlloc] Initwithstyle:uitableviewcellstylesubtitle Reuseidentifier:id]; }NSString*imageurl = [NSStringstringwithformat:@"http://192.168.1.101:8080/tfserver/%@", video. Image];//Use this framework[Cell. ImageViewsetimagewithurl:[NsurlUrlwithstring:imageurl] placeholderimage:[UIImageimagenamed:@"4.jpg"]];returnCell;}

"iOS development" about the use of third-party framework sdwebimage for picture loading

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.