我想從收集箱的圖像填充我的收藏視圖。Dropbox - IOS-斯威夫特3:無法獲取縮略圖
我想用我的網格視圖(集合視圖)的縮略圖圖像與下面的代碼。
DropboxClientsManager.authorizedClient?.files.getThumbnail(path: filename).response(completionHandler: { (
response, error) in
print(response)
print(error)
})
我得到以下錯誤:
Optional([request-id e70dba3b7ee8f0b9bf6b0aa4b19325f0] API route error - {
".tag" = path;
path = {
".tag" = "not_found";
};
})
但是當我嘗試使用這個下面的方法,我得到的錯誤。我不知道我應該回到這個功能,網址getthumbnail:
DropboxClientsManager.authorizedClient?.files.getThumbnail(path: filename, format: .png, size: .w32h32, overwrite: true, destination: { (url, res) -> URL in
print(url)
print(res)
return url
})
更新: 我們不能在iOS中獲取DROPBOX IMAGES的縮略圖URL嗎?
有沒有人有解決方案?
有什麼建議?
您是否有關於使用API v2 swift sdk的示例代碼?我對此非常空白。 – user3804063
你可以參考一個[示例應用程序](https://github.com/dropbox/PhotoWatch),但看起來你已經設法根據[你的新帖子](https:/ /)編寫'getTemporaryLink'調用。 /stackoverflow.com/questions/43890727/ios-collectionview-images-disappear-on-scrolling-and-sometimes-overlaps)。 – Greg
非常感謝,非常感謝。我可以下載尺寸爲32 * 32和任何尺寸的縮略圖。 非常感謝你的寶貴時間。 但我有一個問題,我收集查看細胞圖像滾動消失。 http://stackoverflow.com/questions/43890727/ios-collectionview-images-disappear-on-scrolling-and-sometimes-overlaps/43891043?noredirect=1#comment74818329_43891043 – user3804063