VLCPlaylistTableViewCell.m 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // VLCPlaylistTableViewCell.m
  3. // AspenProject
  4. //
  5. // Created by Felix Paul Kühne on 01.04.13.
  6. // Copyright (c) 2013 VideoLAN. All rights reserved.
  7. //
  8. #import "VLCPlaylistTableViewCell.h"
  9. @implementation VLCPlaylistTableViewCell
  10. @synthesize titleLabel = _titleLabel, subtitleLabel = _subtitleLabel, thumbnailView = _thumbnailView;
  11. + (VLCPlaylistTableViewCell *)cellWithReuseIdentifier:(NSString *)ident
  12. {
  13. NSArray *nibContentArray = [[NSBundle mainBundle] loadNibNamed:@"VLCPlaylistTableViewCell" owner:nil options:nil];
  14. NSAssert([nibContentArray count] == 1, @"meh");
  15. NSAssert([[nibContentArray lastObject] isKindOfClass:[VLCPlaylistTableViewCell class]], @"meh meh");
  16. VLCPlaylistTableViewCell * cell = (VLCPlaylistTableViewCell *)[nibContentArray lastObject];
  17. CGRect frame = [cell frame];
  18. UIView *background = [[UIView alloc] initWithFrame:frame];
  19. background.backgroundColor = [UIColor colorWithWhite:.05 alpha:1.];
  20. cell.backgroundView = background;
  21. [background autorelease];
  22. UIView *highlightedBackground = [[UIView alloc] initWithFrame:frame];
  23. highlightedBackground.backgroundColor = [UIColor colorWithWhite:.2 alpha:1.];
  24. cell.selectedBackgroundView = highlightedBackground;
  25. [highlightedBackground autorelease];
  26. return cell;
  27. }
  28. + (CGFloat)heightOfCell
  29. {
  30. return 80.;
  31. }
  32. @end