タグ

ブックマーク / qiita.com/katsuhisaishii (1)

  • dispatch_afterを使って遅延実行する - Qiita

    例えば、画像のダウンロード状況をプログレスで表示していて、プログレスが100%の状態を一定時間ユーザーに見せておきたい場合、以下のように記述します。 ※画像のダウンロード処理はSDWebImageを使用しています。 [[SDWebImageDownloader sharedDownloader] downloadImageWithURL:photo.imamgeURL options:0 progress: ^(NSInteger receivedSize, NSInteger expectedSize) { float progress = [@(receivedSize) floatValue]/[@(expectedSize) floatValue]; progressView.progress = progress; } completed:^(UIImage *image, NS

    dispatch_afterを使って遅延実行する - Qiita
  • 1