1
AFNetworking UIKit에서 UIProgressView + AFNetworking 카테고리를 사용하려고합니다. 사진을 서버에 업로드하는 작업이 있습니다. 한 번에 여러 사진. 그러나 나의 진도보기는 전혀 업데이 트되지 않습니다. 내 UIProgressView에서UIProgressView + AFNetworking이 진행 상황을 업데이트하지 않습니다.
나는
[progressView setProgressWithUploadProgressOfOperation:operation animated:YES];
를 사용하여 내 요청은 다음과 같습니다
AFHTTPRequestOperation *operation =
[manager POST:url parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
[formData appendPartWithFileData:imageData name:@"imageFile" fileName:fileName mimeType:[NSString stringWithFormat:@"image/%@",fileMime]];
NSLog(@"Uploading...");
[SVProgressHUD showWithStatus:@"Uploading File..."];
} success:^(AFHTTPRequestOperation *operation, id responseObject) {
//Success
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
//Fail
[manager.operationQueue cancelAllOperations];
}];