List of all Iphone and Blackberry Development codes in a one click Iphone,objective C,xcode,blackberry Development,iOS Development

Thursday, March 16, 2017

ios sdwebimage

display image from url using sdwebimage. download

#import "UIImageView+WebCache.h"

 UIImageView *imgView=[[UIImageView alloc] initWithFrame:CGRectMake(10, 25, 80, 80)];
    imgView.backgroundColor=[UIColor clearColor];
     [imgView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",IMAGE_URL,imageUrl]] placeholderImage:[UIImage imageNamed:[NSString stringWithFormat:@"images.png"]]];
    imgView.contentMode = UIViewContentModeScaleAspectFit;
    [self.view addSubview:imgView];

No comments:

Post a Comment