CocoaPods操作

更新本地仓库:
第一种:

pod repo update

第二种:

cd ~/.cocoapods
cd repos
cd master
ls -a
git pull

使用:

cd 工程
pod init
PodFile里加入第三方库 pod 'AFNetworking'
pod install --verbose --no-repo-update

使用CocoaPods找不到头文件解决方法:
http://www.360doc.com/content/15/0302/15/20919452_451991897.shtml

远端私有库更新后
本地也需要更新

pod update
pod repo update
pod install

适配iOS11

#define  GAScrollViewInsets_NO(scrollView,vc)\
    if(IOS11_OVER)\
    do { \
        _Pragma("clang diagnostic push") \
        _Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
        if ([UIScrollView instancesRespondToSelector:NSSelectorFromString(@"setContentInsetAdjustmentBehavior:")]) {\
        [scrollView   performSelector:NSSelectorFromString(@"setContentInsetAdjustmentBehavior:") withObject:@(2)];\
        } else {\
        vc.automaticallyAdjustsScrollViewInsets = NO;\
    }\
        _Pragma("clang diagnostic pop") \
    } while (0);

你可能感兴趣的:(CocoaPods操作)