Reputation: 41
I am working with an iOS application in which i have to upload the images on service (Facebook) from my iOS application.When i start uploading i want the functionality to Pause and Resume method while Uploading. I don't know how to do these functionalities? please help me out if you have any information. Thanks in advance.
Upvotes: 0
Views: 1500
Reputation: 2312
use NSURLSessionUploadTask
for uploading a file. NSURLSessionUploadTask
class is inherited from NSURLSessionDataTask : NSURLSessionTask : NSObject
.
And NSURLSessionTask
provides Controlling the Task State
– cancel
– resume
– suspend
useful links: <NSURLSessionTask> NSURLSessionUploadTask
Try to implement this.
If you are using AFNetworking
you can also achieve the same by using AFHTTPRequestOperation
.
Upvotes: 2