I've tried sending [UIProgressView setProgress]
negative values, and that doesn't work.
Is there some other way to get a progress bar that fills from the right-hand end?
To work with the progress bar component install react-native-paper module using npm. It takes value from 0 to 10. The number value to be given to show inside the progress bar. The color of the progress bar.
Instead of using . transform to increase the height, you need to use a height constraint on the progress bar. This will increase the height and . cornerRadius will act as expected.
You could try setting the transform
property of your UIProgressView
to a new CGAffineTransform
that rotates the view by 180 degrees and flips it vertically (to preserve the "shininess") (see CGAffineTransformMake()
and CGAffineTransformRotate()
).
Something along the lines of:
UIProgressView *pv = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar];
pv.frame = CGRectMake(10, 100, 300, 11);
CGAffineTransform transform = CGAffineTransformMake(1, 0, 0, -1, 0, pv.frame.size.height); // Flip view vertically
transform = CGAffineTransformRotate(transform, M_PI); //Rotation angle is in radians
pv.transform = transform;
pv.progress = 0.5;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With