3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

FacebookへのRequestの進捗を取得できるcategoryを作った

Last updated at Posted at 2014-02-16

Facebook SDKを利用する場合、動画など大きいリソースをPOSTする場合、SDKがdidSendBodyDataからのInterfaceを持っていなかったため,Categoryで実装してみました。

利用方法は簡単で

# import "FBRequestConnection+FBRequestConnection_progress.h"

とヘッダーファイルをimportして

  FBRequestConnection *requestConnection = [[FBRequestConnection alloc] init];

  [requestConnection setProgress:^(float progress){
      // update UI 
  }];

FBRequestConnectionにprogressを取得するBlocksをセットすればokです。
この中でUIへの反映など行えば,ユーザに進捗状況を提示できます。

githubにあげていますので、自由に利用してください。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?