簡體   English   中英

如果圖像采用數據形式,如何使用SdWebImage處理圖像?

[英]How To use SdWebImage for images if they are in the form of Data?

我是iPhone開發的新手。 當圖像以url形式可用時,使用SdwebImage很好。 但是當使用數據形式的圖像時,我無法使用它。

提前致謝。

你要轉換NSDataNSString ,並在這之后,你必須轉換成NSStringNSURL然后用它在SDWebImage ,如: -

NSString *urlString = [[NSString alloc] initWithData:myData encoding:NSUTF8StringEncoding]; 
NSURL *url = [[NSURL alloc] initWithString:urlString];

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM