Commit 18ad2985 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

VLCSlider: use the default look on iOS 7 and above

parent da74fe8d
......@@ -16,20 +16,25 @@
- (void)awakeFromNib
{
self.minimumValueImage = [UIImage imageNamed:@"sliderminiValue"];
self.maximumValueImage = [UIImage imageNamed:@"slidermaxValue"];
[self setMinimumTrackImage:[UIImage imageNamed:@"sliderminimumTrack"] forState:UIControlStateNormal];
[self setMaximumTrackImage:[UIImage imageNamed:@"slidermaximumTrack"] forState:UIControlStateNormal];
[self setThumbImage:[UIImage imageNamed:@"ballSlider"] forState:UIControlStateNormal];
[self setThumbImage:[UIImage imageNamed:@"knobSlider"] forState:UIControlStateHighlighted];
if (SYSTEM_RUNS_IOS7_OR_LATER)
return;
self.minimumValueImage = [UIImage imageNamed:@"sliderminiValue"];
self.maximumValueImage = [UIImage imageNamed:@"slidermaxValue"];
[self setMinimumTrackImage:[UIImage imageNamed:@"sliderminimumTrack"] forState:UIControlStateNormal];
[self setMaximumTrackImage:[UIImage imageNamed:@"slidermaximumTrack"] forState:UIControlStateNormal];
[self setThumbImage:[UIImage imageNamed:@"ballSlider"] forState:UIControlStateNormal];
[self setThumbImage:[UIImage imageNamed:@"knobSlider"] forState:UIControlStateHighlighted];
}
- (CGRect)trackRectForBounds:(CGRect)bounds
{
CGRect returnValue = [super trackRectForBounds:bounds];
if (SYSTEM_RUNS_IOS7_OR_LATER)
return returnValue;
returnValue.origin.x = 5.;
if (!SYSTEM_RUNS_IOS7_OR_LATER)
returnValue.origin.y = 7.;
returnValue.origin.y = 7.;
returnValue.size.width = bounds.size.width - 10.;
return returnValue;
}
......@@ -41,6 +46,9 @@
- (void)awakeFromNib
{
if (SYSTEM_RUNS_IOS7_OR_LATER)
return;
self.minimumValueImage = [UIImage imageNamed:@"sliderminiValue"];
self.maximumValueImage = [UIImage imageNamed:@"slidermaxValue"];
[self setMinimumTrackImage:[UIImage imageNamed:@"sliderminimumTrack"] forState:UIControlStateNormal];
......@@ -51,6 +59,9 @@
- (CGRect)trackRectForBounds:(CGRect)bounds
{
CGRect returnValue = [super trackRectForBounds:bounds];
if (SYSTEM_RUNS_IOS7_OR_LATER)
return returnValue;
returnValue.origin.x = 5.;
if (!SYSTEM_RUNS_IOS7_OR_LATER)
returnValue.origin.y = 7.;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment