VLCTrackSelectorHeaderView.m 1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
/*****************************************************************************
 * VLCTrackSelectorHeaderView.m
 * VLC for iOS
 *****************************************************************************
 * Copyright (c) 2014 VideoLAN. All rights reserved.
 * $Id$
 *
 * Authors: Felix Paul Kühne <fkuehne # videolan.org>
 *
 * Refer to the COPYING file of the official project for license.
 *****************************************************************************/

#import "VLCTrackSelectorHeaderView.h"
#import "UIDevice+SpeedCategory.h"

@implementation VLCTrackSelectorHeaderView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];

    if (!self)
        return self;

    self.contentView.backgroundColor = [UIColor VLCDarkBackgroundColor];
    self.textLabel.textColor = [UIColor whiteColor];

    if ([[UIDevice currentDevice] speedCategory] >= 3) {
        self.opaque = NO;
        self.alpha = .8;
    }

    return self;
}

@end