Commit 5e8ad617 authored by Marvin Scholz's avatar Marvin Scholz

macosx: Remove flawed cell initialization

The developer needs to ensure the Cell class is set correctly in IB,
as there is no good way to do this the right way in code, without
loosing all settings from IB for the cell.
parent a2022f51
......@@ -30,9 +30,8 @@
{
self = [super initWithCoder:coder];
if (self) {
if (![self.cell isKindOfClass:[VLCDefaultValueSliderCell class]]) {
self.cell = [[VLCDefaultValueSliderCell alloc] init];
}
NSAssert([self.cell isKindOfClass:[VLCDefaultValueSliderCell class]],
@"VLCDefaultSlider cell is not VLCDefaultValueSliderCell");
_isScrollable = YES;
}
return self;
......
......@@ -31,9 +31,8 @@
self = [super initWithCoder:coder];
if (self) {
if (![self.cell isKindOfClass:[VLCSliderCell class]]) {
self.cell = [[VLCSliderCell alloc] init];
}
NSAssert([self.cell isKindOfClass:[VLCSliderCell class]],
@"VLCSlider cell is not VLCSliderCell");
}
return self;
}
......@@ -49,14 +48,6 @@
[super setNeedsDisplayInRect:[self bounds]];
}
- (void)awakeFromNib {
[super awakeFromNib];
if(![self.cell isKindOfClass:[VLCSliderCell class]]) {
self.cell = [[VLCSliderCell alloc] init];
}
}
- (BOOL)getIndefinite
{
return [(VLCSliderCell*)[self cell] indefinite];
......
......@@ -32,9 +32,8 @@
self = [super initWithCoder:coder];
if (self) {
if (![self.cell isKindOfClass:[VLCVolumeSliderCell class]]) {
self.cell = [[VLCVolumeSliderCell alloc] init];
}
NSAssert([self.cell isKindOfClass:[VLCVolumeSliderCell class]],
@"VLCVolumeSlider cell is not VLCVolumeSliderCell");
}
return self;
}
......
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