0

I am trying to set track and progress images for a progressview. What i have tried is setting the images in the interface builder and by code. Both are not working. I have read that this is a bug that was also present on iOS7. So far i haven't found a suitable fix.

What i have currently:

self.progressView.trackImage = UIImage(named: "Run - GoalEmpty")?.resizableImageWithCapInsets(UIEdgeInsetsZero)
self.progressView.progressImage = UIImage(named: "Run - GoalFull")?.resizableImageWithCapInsets(UIEdgeInsetsZero)

Also tried setting the tint to clearColor. The progressbar is working perfectly, only the images aren't. Does anyone has a fix for this?

EricDXS
  • 882
  • 9
  • 11
  • are your images' names correct in the bundle? – holex Nov 28 '14 at 11:02
  • Yes, images load correctly into a imageview with these names. – EricDXS Nov 28 '14 at 11:03
  • have you tried to set these images via the `appearance` protocol yet? – holex Nov 28 '14 at 11:06
  • No, i haven't. How do you set these images with the appearance protocol? – EricDXS Nov 28 '14 at 15:42
  • you may find that interesting the source, it has some examples too, but obviously the final implementation is up to you: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAppearance_Protocol/index.html – holex Nov 28 '14 at 15:50
  • Thank you for your suggestions, i solved it eventually with this: http://stackoverflow.com/questions/22311516/uiprogressview-custom-track-and-progress-images-in-ios-7-1 – EricDXS Dec 04 '14 at 10:35

0 Answers0