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;
}
}
}明解C语言(第3版)
[日] 柴田望洋 / 管杰、罗勇、杜晓静 / 人民邮电出版社 / 2015-11-1 / 79.00元
本书是日本的C语言经典教材,自出版以来不断重印、修订,被誉为“C语言圣经”。 本书图文并茂,示例丰富,第3版从190段代码和164幅图表增加至205段代码和220幅图表,对C语言的基础知识进行了彻底剖析,内容涉及数组、函数、指针、文件操作等。对于C语言语法以及一些难以理解的概念,均以精心绘制的示意图,清晰、通俗地进行讲解。原著在日本广受欢迎,始终位于网上书店C语言著作排行榜首位。一起来看看 《明解C语言(第3版)》 这本书的介绍吧!
