VLCStreamingHistoryCell.m 1.16 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 37
/*****************************************************************************
 * VLCStreamingHistoryCell.m
 * VLC for iOS
 *****************************************************************************
 * Copyright (c) 2016 VideoLAN. All rights reserved.
 * $Id$
 *
 * Authors: Adam Viaud <mcnight # mcnight.fr>
 *
 * Refer to the COPYING file of the official project for license.
 *****************************************************************************/

#import "VLCStreamingHistoryCell.h"

@implementation VLCStreamingHistoryCell

- (BOOL)canBecomeFirstResponder {
    return YES;
}

- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
    return (action == @selector(copy:) || action == @selector(renameStream:)) || [super canPerformAction:action withSender:sender];
}

- (void)customizeAppearance {
    UIColor *blackColor = [UIColor blackColor];
    self.textLabel.textColor = [UIColor whiteColor];
    self.textLabel.highlightedTextColor = blackColor;
    self.detailTextLabel.textColor = [UIColor VLCLightTextColor];
    self.detailTextLabel.highlightedTextColor = blackColor;
}

- (void)renameStream:(id)sender {
    [self.delegate renameStreamFromCell:self];
}

@end