Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone UIProgressBar

I am having two values targetValue and receivedValue . Now I want to show the status on Progress bar. Means if targetValue is 1000 and receivedValue is 500 then progress bar should display 50% of filled area.

So I want to know that is there any easy way to do so... or I have to calculate the values any have to set with myProgressBar.progress = value ?

like image 372
Maulik Avatar asked Apr 28 '26 09:04

Maulik


1 Answers

Use below

myProgressBar.progress = receivedValue /targetValue ;

The value of receivedValue /targetValue will fall in the range of 0.0 to 1.0 ;

like image 95
Jhaliya - Praveen Sharma Avatar answered Apr 30 '26 02:04

Jhaliya - Praveen Sharma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!