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