objective-c - Put the obtained pictures in an array and use a for loop to call the single picture upload interface to upload the pictures. Why is only the last picture uploaded successfully?
First of all, I don’t know OC very well. I don’t know whether your method of uploading pictures is single-threaded or multi-threaded. However, I feel that it should not be executed in a For loop. Putting it in a For loop will upload all pictures. You can consider it. Add an upload success event listener. After each picture is uploaded successfully or fails, the next picture is uploaded.
First of all, I don’t know OC very well. I don’t know whether your method of uploading pictures is single-threaded or multi-threaded. However, I feel that it should not be executed in a For loop. Putting it in a For loop will upload all pictures. You can consider it. Add an upload success event listener. After each picture is uploaded successfully or fails, the next picture is uploaded.
I still don’t understand why