I've been searching around cocoa controls and haven't been able to find a progress view that can give me a background image and it puts highlights the image with a color as the progress continues.
For reference I am talking about something as such:
I've only found things that highlight the image but you control the placement with a UISlider
below it. Does anything like this exist somewhere? Or is there a simple solution for assigning properties to the UIProgressView
to do this?
UPDATE:
So I am using a UIImageView
behind a UISlider
, that currently looks like this:
Here is the code for adding the UISlider
:
-(void)addBottomMostHiddenView{
_myToolbarHiddenView = [[UIView alloc]initWithFrame:
CGRectMake(0, self.view.frame.size.height - 40, self.view.frame.size.width, 50)];
[_myToolbarHiddenView setBackgroundColor:[UIColor colorWithWhite:0.2 alpha:0.8]];
[_slider addTarget:self action:@selector(sliderAction) forControlEvents:UIControlEventValueChanged];
[_slider setBackgroundColor:[UIColor clearColor]];
_slider.minimumValue = 0.0;
_slider.maximumValue = 320.0;
_slider.continuous = YES;
_slider.value = 25.0;
_slider.thumbTintColor = [UIColor redColor];
[_myToolbarHiddenView addSubview:_slider];
[self.view addSubview:_myToolbarHiddenView];
}
The waveform Image is added elsewhere with:
UIImageView *image = [[UIImageView alloc] initWithImage:responseObject];
image.frame = CGRectMake(0, 0, self.view.frame.size.width, 40);
[_myToolbarHiddenView addSubview:image];
Now I just need to get rid of the "thumbImage" ("read only" property it seems) and the bar, and add highlighting over everything. Any thoughts? It doesn't seem that I can get rid of the bar. Also I can adjust the height of the bar to overlay the whole image either it seems.