Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 iphone 开发新手。当图像以 url 的形式提供时,使用 SdwebImage 很好。但是当谈到以数据形式存在的图像时,我无法使用它。
提前致谢。
您必须转换NSData为NSString,在此之后您必须转换为NSStringin 才能NSURL使用它SDWebImage:-
NSData
NSString
NSURL
SDWebImage
NSString *urlString = [[NSString alloc] initWithData:myData encoding:NSUTF8StringEncoding]; NSURL *url = [[NSURL alloc] initWithString:urlString];