0

I've got a simple UIProgressView with a custom colour, I want to lose the Apple shadow, can this be done?

[[UIProgressView appearance] setProgressTintColor:[UIColor colorWithRed:5/255 green:72/255 blue:255/255 alpha:1.0]];
[[UIProgressView appearance] setTrackTintColor:[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.000]];

Thanks

Sebastian
  • 7,670
  • 5
  • 38
  • 50
Nathan Cleary
  • 653
  • 8
  • 20

1 Answers1

2

Not in the way that you're thinking. You're going to have to use a couple really basic images.

You can see this post for a nice explanation with some good pictures. But basically your going to have to use:

[[UIProgressView appearance] setProgressImage:[[UIImage imageNamed:@"ProgressImage"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 1, 0, 1)]];
[[UIProgressView appearance] setTrackImage:[[UIImage imageNamed:@"TrackImage"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 1, 0, 1)]];

With whatever color images you wish to use. If you just want straight colors, then just make some simple little single color blocks or go crazy with some gradients.

Community
  • 1
  • 1
SethHB
  • 743
  • 4
  • 12