1.使用私有库
一。新建TestPrivateCocoapods工程,新建Podfile文件。
#官方Cocoapods的源
source 'https://github.com/CocoaPods/Specs.git'
#本地私有库
source 'https://github.com/yanyi0/BlueCloudSpecs.git'
platform :ios,'8.0'
inhibit_all_warnings!
target 'TestPrivateCocoapods' do
pod 'AFNetworking'
pod 'Masonry','~> 1.0.2'
pod 'MBProgressHUD','~>1.0.0'
pod 'SDWebImage','~>4.1.0'
pod 'MJExtension'
pod 'MJRefresh', '~> 3.1.12'
pod 'MBProgressHUD', '~> 1.0.0'
pod 'Mantle','~> 1.5.5'
pod 'WebViewJavascriptBridge'
pod 'SVProgressHUD'
pod 'BCAlertView'
pod 'DYObject'
end
此处并不指定版本号,默认会拉取最新的版本号。
使用私有库
self.alertView = [[BCAlertView alloc] initWithFrame:[UIScreen mainScreen].bounds withStatusType:HotUpdatingStatus];
self.alertView.delegate = self;
self.hotUpdateUrl = VideoUrl;
-(void)alertView:(BCAlertView *)alertView didSelectOptionButtonWithTag:(NSInteger)tag
{
if (tag == 1001) {
[[DYDownloadTool shared] downLoadWithUrl:self.hotUpdateUrl withAlertView:alertView];
}
else if(tag == 1002)
{
UIButton *btn = [alertView viewWithTag:tag];
if ([btn.titleLabel.text isEqualToString:@"好的"]) {
[alertView dismiss];
}
else if([btn.titleLabel.text isEqualToString:@"再次更新"])
{
[[DYDownloadTool shared] downLoadWithUrl:self.hotUpdateUrl withAlertView:alertView];
}
}
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[self.alertView show];
}
[BCAlertView私有库地址] (https://github.com/yanyi0/BCAlertView.git)
第三篇介绍《iOS Cocoapods版本号概念》