123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /*****************************************************************************
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2015 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Tobias Conradi <videolan # tobias-conradi.de>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
- #import "VLCServerBrowsingTVCell.h"
- NSString *const VLCServerBrowsingTVCellIdentifier = @"VLCServerBrowsingTVCell";
- @implementation VLCServerBrowsingTVCell
- @synthesize thumbnailURL = _thumbnailURL, isDirectory = _isDirectory;
- - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- return [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier];
- }
- - (void)setThumbnailURL:(NSURL *)thumbnailURL {
- _thumbnailURL = thumbnailURL;
- [self.thumbnailImageView setImageWithURL:thumbnailURL];
- }
- - (void)setThumbnailImage:(UIImage *)thumbnailImage {
- [self.thumbnailImageView setImage:thumbnailImage];
- }
- -(UIImage *)thumbnailImage {
- return self.thumbnailImageView.image;
- }
- - (void)setTitle:(NSString *)title {
- self.titleLabel.text = title;
- }
- - (NSString *)title {
- return self.titleLabel.text;
- }
- - (void)setSubtitle:(NSString *)subtitle {
- self.subtitleLabel.text = subtitle;
- }
- - (NSString *)subtitle {
- return self.subtitleLabel.text;
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- [self prepareForReuse];
- }
- - (void)prepareForReuse {
- [super prepareForReuse];
- [self.thumbnailImageView cancelLoading];
- self.title = nil;
- self.subtitle = nil;
- }
- @end
|