問題描述
使用具有身份驗證的 URL 設置圖像‑IOS SDK (Set Image With URL having authentication‑IOS SDK)
Hello i am trying to display images from url in tableview,the problem is that url is having authentication,how to display image url having authentication.Code i tried is given below.
[cell.im setImageWithURL:[NSURL
URLWithString:@"https://bouxxxx.XXXxtech.net/api/images/products/426/690"]
placeholderImage:[UIImage imageNamed:@"botton_orange_up 2.png"]];
參考解法
方法 1:
first you send your username and password in your post method with api and then server authentication with you to get data from server and load image in tableview check out the apple source code its help you
http://developer.apple.com/library/ios/#samplecode/LazyTableImages/
(by Suraj K Thomas、Sumit Mundra)