cocoapods导入第三方库

1.移除现有Ruby默认源

终端:gem sources --remove https://rubygems.org/

2.使用新的源

终端:gem sources -a https://ruby.taobao.org/

3.验证新源是否替换成功

终端:gem sources -l

4.安装CocoaPods

终端:sudo gem install cocoapods 

终端:pod setup

5.需要在工程里面添加一个空得文件命名为Podfile,取名为Podfile

pod 'Masonry' 

xcodeproj '/Users/huoran/Documents/IOS/Autolayout/Autolayout.xcodeproj'

6.Podfile里面将需要导入的第三方库 pod, eg: pod ‘Masonry’

7.在终端进入工程的Podfile目录输入pod install

 

 

posted @ 2016-01-15 16:49  浪味小仙女  阅读(340)  评论(0编辑  收藏  举报