<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          DownloadButtoniOS 下載按鈕

          聯(lián)合創(chuàng)作 · 2023-09-25 22:09

          DownloadButton 是可自定義的 App Store 風(fēng)格的下載按鈕??勺远x設(shè)計(jì)組件,用 IB 進(jìn)行編輯。
          使用示例:

          #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;
                  }
              }
          }

          Designable button

          瀏覽 18
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  大鸡吧操逼视频 | 亚洲爆乳无码精品AAA片蜜桃 | 亚洲色婷婷综合久久久中文 | 中国黄色视频免费看 | av超碰在线 |