VLCPlaylistTableViewCell.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. + (VLCPlaylistTableViewCell *)cellWithReuseIdentifier:(NSString *)ident
  11. {
  12. NSArray *nibContentArray = [[NSBundle mainBundle] loadNibNamed:@"VLCPlaylistTableViewCell" owner:nil options:nil];
  13. NSAssert([nibContentArray count] == 1, @"meh");
  14. NSAssert([[nibContentArray lastObject] isKindOfClass:[VLCPlaylistTableViewCell class]], @"meh meh");
  15. VLCPlaylistTableViewCell *cell = (VLCPlaylistTableViewCell *)[nibContentArray lastObject];
  16. CGRect frame = [cell frame];
  17. UIView *background = [[UIView alloc] initWithFrame:frame];
  18. background.backgroundColor = [UIColor colorWithWhite:.05 alpha:1.];
  19. cell.backgroundView = background;
  20. [background autorelease];
  21. UIView *highlightedBackground = [[UIView alloc] initWithFrame:frame];
  22. highlightedBackground.backgroundColor = [UIColor colorWithWhite:.2 alpha:1.];
  23. cell.selectedBackgroundView = highlightedBackground;
  24. [highlightedBackground autorelease];
  25. return cell;
  26. }
  27. + (CGFloat)heightOfCell
  28. {
  29. return 80.;
  30. }
  31. @end