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.
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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.