How to set progress image in UIProgressView

I am trying to set the “Progress” and “Track” image to represent UIProgress using the constructor, the preview screen shows me the desired view with the track image as the background of the progress bar and the “Progress” image used for the progress bar. But when I run my code, both images are not used, and progress is displayed using the background color and the hue of the view. Can someone tell me how to override the hue color and background color and use the "Progress" and "Track Image" properties.

enter image description here

+4
source share
2 answers

Try executing the following code programmatically,

[progressView setTrackImage:[UIImage imageNamed:@"track"]]; 
[progressView setProgressImage:[UIImage imageNamed:@"progress"]];
+8
source

A simple solution to override the hue color of a UIProgressView:

progressVw.trackTintColor = [UIColor whiteColor];  

If you want to set backColor UIProgressView -

Use Custom UIProgessView

If you want to set the progress image and track image of UIProgressView -

Send this link Image of progress and image of track

+2
source

All Articles