1

Currently I'm able to customize my progress bar modifying the whole height, in this way:

let transformScale = CGAffineTransformMakeScale(1.0, newProgressbarHeight)
self.progressBar.transform = transformScale

There is a way to modify the height of track in order to obtain a progress bar like this?

enter image description here

As a workaround I was pondering of put a gray view under the progress bar track tint color to clear color.

Any ideas?

Luca Davanzo
  • 21,000
  • 15
  • 120
  • 146
  • Try using resizable images for progress and track bar as per your need. here is a ex in which it explained how to use images in these http://stackoverflow.com/questions/7980891/uiprogressview-and-custom-track-and-progress-images-ios-5-properties – Wolverine Dec 15 '15 at 11:22

1 Answers1

2

iOS 5 or later, UIProgressView could set its FrontProgress Image(Green Fat) And its Background Image(Gray Slim).
You could set Two different picture to simulate this effect.
Front Image property: progressImage. Background Image property: trackImage.
Or, If you only like Pure Color to avoid wasting any resource, I think the method below will fit your demand.

1.Create two UIProgressView.Fat and Slim, Front and Behind.

2.Set the Front One's trackTintColor [UIColor clearColor].

The code and effect in simulator
I hope these could help you. Good Luck!

GrassLake
  • 21
  • 5