- 闂1.AFN 澶勭悊鏈夊叧鍥剧墖鐩稿叧鐨勮姹傜殑闂
- 鍦ㄤ娇鐢ˋFN Post缃戠粶鍥剧墖鐨勬椂鍊欏彂鐜?span>NSLocalizedDescription=Request failed: unacceptable content-type: image/jpeg}
- 鍙槸鑷繁鏄庢槑鏈夋坊鍔?/span>
- mgr.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/html", @"image/jpeg", @"image/png", nil];
- 鍚庢潵涓嶇煡閬撴€庝箞鍥炰簨锛屽氨鏄墦鏂偣鍚庢潵鍙戠幇杩欏彞浠g爜鏄敓鏁堜簡锛屽彲鏄鍚庤竟鐨?/span>
- mgr.responseSerializer = [AFJSONResponseSerializer serializer];缁欒鐩栨帀浜嗭紝涔熷氨鏄acceptContentTypes涓殑image/jpeg鍙堝け鏁堜簡
- 鍚庢潵鏄湪鍙戦€佹湁鍥剧墖鐩稿叧璇锋眰涔嬪墠閲嶆柊璧嬪€间竴娆cceptableContentTypes鏉ヨВ鍐崇殑闂
- 闂2锛氬湪蹇界暐鏈湴缂撳瓨鐨勬儏鍐典笅锛岀敤SDWebImage 闇€瑕佷粠鏈嶅姟鍣ㄨ姹傜綉缁滃浘鐗囬亣鍒扮殑闂
- 涓嶇煡閬撲负浠€涔堝啓鐨勬槸options:SDWebImageRefreshCached锛屽彲鏄粠鏈嶅姟鍣ㄤ笂杈规嬁鍒扮殑鍥剧墖杩樻槸涓嶆槸鎯宠鐨勯偅涓紝涓嶈兘瀹炴椂鏇存柊
- 闂1.AFN 澶勭悊鏈夊叧鍥剧墖鐩稿叧鐨勮姹傜殑闂
-
-
-
- 鍚庢潵鍚勭鏌ュ彂鐜癝DWebImage纭疄鏈夎繖涓棶棰橈紝鐢ㄨ嚜宸辩殑璇濊鏄拰鏈嶅姟鍣ㄧ璁剧疆鐨凥TTP鐨刪eader澶撮噷鐨刵o cache鏈夊叧绯伙紝杩欎竴鐐逛互鍚庡啀浠旂粏鐪?/span>
-
-
-
- 缃戝潃鏄繖閲岋細https://stackoverflow.com/questions/34065213/sdwebimage-not-updating-image-in-cache
- 閭d箞瑕佷箞鎴戜滑鎹㈡柟娉曡涔堝氨鍜屽悗鍙板幓鑱婂彲鑳介櫎浜嗚繖涓猦eader鐨刵o-cache杩樻湁鍒殑瑙e喅鏂规硶涔熸湁璇撮€氳繃鏀规SD婧愮爜鐨刲astmodified鐨勯偅涓垜娌¤瘯鎴愬姛
- 閭d箞濡傛灉鏀规垚鍒殑鍔炴硶鐨勮瘽鍏跺疄AFN涔熷彲浠ュ姞杞界綉缁滃浘鐗囷紝浣嗘槸闇€瑕佹敞鎰忕殑鏄彲鑳界敤Get鏂瑰紡鍔犺浇涓嬬殑缃戠粶鍥剧墖鏄痳esponseObject鐩存帴灏辨槸鎴戜滑瑕佺殑鍥剧墖
- 鍏跺疄涔熷彲浠ョ敤AFImageDownloader鏉ュ仛鐩稿簲鐨勫疄鐜帮紝涓嶈繃鍦ㄦ病閬囧埌濂囪懇闂涔嬪墠浣跨敤SD杩樻槸鏇存柟渚跨殑
-
- 鍙兘璇寸殑鏈夌偣涔?璁板綍涓嬫潵涓轰簡浠ュ悗閬囧埌绫讳技闂鐭ラ亾鎬庝箞瑙e喅
- 濡傛湁涓嶅綋涔嬪 鏁鎸囨
- 濡傞渶杞浇 璇锋敞鏄庡嚭澶?璋㈣阿