DownloadButton iOS 下载按钮开源项目

我要开发同款
匿名用户2015年06月25日
160阅读

技术信息

开源地址
https://github.com/PavelKatunin/DownloadButton
授权协议
Apache 2.0

作品详情

DowloadButto是可自定义的AppStore风格的下载按钮。可自定义设计组件,用IB进行编辑。使用示例:

#pragma mark - PKDowloadButtoDelegate- (void)dowloadButtoTapped:(PKDowloadButto *)dowloadButto                 curretState:(PKDowloadButtoState)state {    switch (state) {        case kPKDowloadButtoState_StartDowload:            self.dowloadButto.state = kPKDowloadButtoState_Pedig;            [self.pedigSimulator startDowload];        break;        case kPKDowloadButtoState_Pedig:            [self.pedigSimulator cacelDowload];            self.dowloadButto.state = kPKDowloadButtoState_StartDowload;        break;            case kPKDowloadButtoState_Dowloadig:            [self.dowloaderSimulator cacelDowload];            self.dowloadButto.state = kPKDowloadButtoState_StartDowload;        break;        case kPKDowloadButtoState_Dowloaded:            self.dowloadButto.state = kPKDowloadButtoState_StartDowload;            self.imageView.hidde = YES;        break;        default:            NSAssert(NO, @"usupported state");        break;    }}#pragma mark - DowloaderSimulatorDelegate- (void)simulator:(PKDowloaderSimulator *)simulator didUpdateProgress:(double)progress {    if (simulator == self.pedigSimulator) {        if (progress == 1.) {            self.dowloadButto.state = kPKDowloadButtoState_Dowloadig;            [self.dowloaderSimulator startDowload];        }    }    else if (simulator == self.dowloaderSimulator) {        self.dowloadButto.stopDowloadButto.progress = progress;        if (progress == 1) {            self.dowloadButto.state = kPKDowloadButtoState_Dowloaded;            self.imageView.hidde = NO;        }    }}

功能介绍

DownloadButton 是可自定义的 App Store 风格的下载按钮。可自定义设计组件,用 IB 进行编辑。 使用示例:
#pragma mark - PKDownloadButt...

示例图片

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论