开发者

Load image from plist

开发者 https://www.devze.com 2023-03-26 11:45 出处:网络
I am trying to开发者_Go百科 input the link of the image on one of the plist <string>. What code should I add in to the implementation in order to load the image from that website and display in an

I am trying to开发者_Go百科 input the link of the image on one of the plist <string>. What code should I add in to the implementation in order to load the image from that website and display in an UIImage?


This should work:

NSData *imgData = [[NSData alloc] initWithContentsOfURL:urlFromPlist];
UIImage *img = [UIImage imageWithData:imgData];
[img drawInRect:someRect];
0

精彩评论

暂无评论...
验证码 换一张
取 消