Image download progress bar

In my application, I want to show the upload size of the image in label.like, 5 KB 2 MB.

A progress bar is used to show the download of the image, and I want to show the total size of the downloaded image enter image description here, as well as the completed download size (for example, 5 KB per 2 MB).

Anyone give me advice for this.

For this, what should I do. give me some sample code or tutorial for this.

Information added:

ASIHTTP. . downloding. , ( , ) . , .stil. , .

. , .

+3
3

, .

  • ASIHTTPRequest .
  • , ASI, ASIHTTPRequest.
  • ASIHTTPRequest.h. .
  • , , , .

.

- (void)request:(ASIHTTPRequest *)request incrementDownloadSizeBy:(long long)newLength;
- (void)request:(ASIHTTPRequest *)request didReceiveBytes:(long long)bytes;
+2
+3

Here's a complete tutorial on creating iPhone apps that download images from the web:

Part 2 has the mechanics of having a progress bar, just upload a sample project.

http://www.touch-code-magazine.com/update-your-iphone-app-with-new-content-part-2/

0
source

Source: https://habr.com/ru/post/1792757/


All Articles