常用第三方庫

1 . 在安裝cocoapods 成功的基礎(chǔ)上, 打開你的工程文件.并將pod初始化.

$ cd yourProjectPath

$ pod init

2 .打開podFile文件, 在文件中寫入你想導(dǎo)入的第三方庫.使用(? pod +? '第三方庫名')

$? open -a Xcode Podfile

增加后的 Podfile

# Uncomment the next line to define a global platform for your project

source 'https://github.com/CocoaPods/Specs.git'

# platform :ios, '9.0'

target 'xinjiang' do

? # Comment the next line if you don't want to use dynamic frameworks

? use_frameworks!

? # Pods for xinjiang

? target 'xinjiangTests' do

??? inherit! :search_paths

??? # Pods for testing

? end

? target 'xinjiangUITests' do

??? # Pods for testing

? end

pod 'AFNetworking'

pod 'SDWebImage'

pod 'MJExtension'

pod 'CYLTabBarController'

pod 'MJRefresh'

pod 'Reachability' 網(wǎng)絡(luò)判斷

pod 'DZNEmptyDataSet'或pod 'LYEmptyView'空白頁面數(shù)據(jù)占位

pod 'IQKeyboardManager'

pod 'Masonry'

pod 'SVProgressHUD'

pod 'MBProgressHUD'

pod 'SDCycleScrollView'//輪播圖

end

3 . 將第三方庫導(dǎo)入工程中.

$ pod install --verbose --no-repo-update

上面執(zhí)行不成功加上這句代碼source 'https://github.com/CocoaPods/Specs.git'

以上不行用下面使用清華鏡像

https://mirror.tuna.tsinghua.edu.cn/help/CocoaPods/

$sudo gem install cocoapods

source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

鏈接:http://www.itdecent.cn/p/ff44a3639907

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容