user3746428
user3746428

Reputation: 11175

UIProgressView is not displaying custom track image

I have been trying to implement a UIProgressView to display the percentage of a users budget that they have used so far. I don't want to use the standard progress bar so have been trying to implement a custom one. I am having issues with the custom track image not being displayed.

Here are the settings for the attributes:

enter image description here

The 'Track' image is 280x32 and the progress bar is set to 280 for the width and the height is locked to 2.

I also have tried setting the images in code:

    budgetProgress.trackImage = UIImage(named: "Track")
    budgetProgress.progressImage = UIImage(named: "Progress")

All that is displayed is the standard progress bar.

Upvotes: 0

Views: 343

Answers (1)

Zev Eisenberg
Zev Eisenberg

Reputation: 8168

This is broken in iOS 7.1. There is a radar open on this: http://www.openradar.me/16113307

I wrote a drop-in replacement for UIProgressView that supports custom images. You can get it as part of RZUtils (look for RZProgressView).

Upvotes: 1

Related Questions