ios項目中,如果有網(wǎng)頁的圖片,使用SDWebImage有時候是顯示不出來的,這時候需要使用到谷歌的第三方庫libwebp,在SDWebImage里面有介紹說明

image.png
需要安裝SDWebImageWebPCoder庫,但是這個庫需要依賴 libwebp庫,不過libwebp是被墻了的,所以你懂的。
安裝方式1:
最簡單省事的辦法,直接在項目中的Podfile文件添加這句
指定第三方庫的source源來自github
source 'https://github.com/CocoaPods/Specs.git'

image.png
然后再次執(zhí)行pod就行
安裝方式2:打開命令行窗口
//第一步查看源
pod repo
//第二步,會出現(xiàn)libwebp在本地的文件地址
find ~/.cocoapods/repos/master -iname libwebp

image.png

image.png

image.png
這個文件地址修改為:https://github.com/webmproject/libwebp.git
然后再次執(zhí)行pod