iOS 下载按钮 DownloadButton
- 授权协议: Apache 2.0
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/PavelKatunin/DownloadButton
软件介绍
DownloadButton 是可自定义的 App Store 风格的下载按钮。可自定义设计组件,用 IB 进行编辑。
使用示例:
#pragma mark - PKDownloadButtonDelegate
- (void)downloadButtonTapped:(PKDownloadButton *)downloadButton
currentState:(PKDownloadButtonState)state {
switch (state) {
case kPKDownloadButtonState_StartDownload:
self.downloadButton.state = kPKDownloadButtonState_Pending;
[self.pendingSimulator startDownload];
break;
case kPKDownloadButtonState_Pending:
[self.pendingSimulator cancelDownload];
self.downloadButton.state = kPKDownloadButtonState_StartDownload;
break;
case kPKDownloadButtonState_Downloading:
[self.downloaderSimulator cancelDownload];
self.downloadButton.state = kPKDownloadButtonState_StartDownload;
break;
case kPKDownloadButtonState_Downloaded:
self.downloadButton.state = kPKDownloadButtonState_StartDownload;
self.imageView.hidden = YES;
break;
default:
NSAssert(NO, @"unsupported state");
break;
}
}
#pragma mark - DownloaderSimulatorDelegate
- (void)simulator:(PKDownloaderSimulator *)simulator didUpdateProgress:(double)progress {
if (simulator == self.pendingSimulator) {
if (progress == 1.) {
self.downloadButton.state = kPKDownloadButtonState_Downloading;
[self.downloaderSimulator startDownload];
}
}
else if (simulator == self.downloaderSimulator) {
self.downloadButton.stopDownloadButton.progress = progress;
if (progress == 1) {
self.downloadButton.state = kPKDownloadButtonState_Downloaded;
self.imageView.hidden = NO;
}
}
}深入浅出 HTTPS:从原理到实战
虞卫东 / 电子工业出版社 / 2018-6 / 89
本书是一本专业的HTTPS书籍,全面讲解了HTTPS领域的相关知识,内容包括密码学、OpenSSL命令行、证书、TLS协议、HTTPS网站性能优化、HTTPS网站优秀实践、大型网站HTTPS架构设计等。本书有几个特点:(1)内容全面而新颖,基于RFC文档、国外书籍、社区等一手资料,总结了大部分最新的HTTPS知识;(2)由浅入深,从基础到进阶全面掌握HTTPS,读者能够轻松构建一个HTTPS网站,......一起来看看 《深入浅出 HTTPS:从原理到实战》 这本书的介绍吧!
CSS 压缩/解压工具
在线压缩/解压 CSS 代码
MD5 加密
MD5 加密工具
