Small tweak to fix progress issue when delegate is a UIProgressView (thanks to R…
…oman Busyghin for this fix)
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -488,7 +488,7 @@ static NSError *ASIUnableToCreateRequestError; | @@ -488,7 +488,7 @@ static NSError *ASIUnableToCreateRequestError; | ||
488 | 488 | ||
489 | // We aren't using a queue, we should just set progress of the indicator | 489 | // We aren't using a queue, we should just set progress of the indicator |
490 | } else { | 490 | } else { |
491 | - [ASIHTTPRequest setProgress:(double)(byteCount/postLength) forProgressIndicator:uploadProgressDelegate]; | 491 | + [ASIHTTPRequest setProgress:(double)(1.0*byteCount/postLength) forProgressIndicator:uploadProgressDelegate]; |
492 | } | 492 | } |
493 | 493 | ||
494 | } | 494 | } |
@@ -557,7 +557,7 @@ static NSError *ASIUnableToCreateRequestError; | @@ -557,7 +557,7 @@ static NSError *ASIUnableToCreateRequestError; | ||
557 | 557 | ||
558 | // We aren't using a queue, we should just set progress of the indicator to 0 | 558 | // We aren't using a queue, we should just set progress of the indicator to 0 |
559 | } else if (contentLength > 0) { | 559 | } else if (contentLength > 0) { |
560 | - [ASIHTTPRequest setProgress:(double)(bytesReadSoFar/contentLength) forProgressIndicator:downloadProgressDelegate]; | 560 | + [ASIHTTPRequest setProgress:(double)(1.0*bytesReadSoFar/contentLength) forProgressIndicator:downloadProgressDelegate]; |
561 | } | 561 | } |
562 | } | 562 | } |
563 | 563 |
-
Please register or login to post a comment