VLCPlaybackInfoTrackTVTitleView.m 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*****************************************************************************
  2. * VLC for iOS
  3. *****************************************************************************
  4. * Copyright (c) 2015 VideoLAN. All rights reserved.
  5. * $Id$
  6. *
  7. * Authors: Tobias Conradi <videolan # tobias-conradi.de>
  8. *
  9. * Refer to the COPYING file of the official project for license.
  10. *****************************************************************************/
  11. #import "VLCPlaybackInfoTrackTVTitleView.h"
  12. @implementation VLCPlaybackInfoTrackTVTitleView
  13. - (instancetype)initWithFrame:(CGRect)frame
  14. {
  15. self = [super initWithFrame:frame];
  16. if (self) {
  17. UILabel *label = [[UILabel alloc] initWithFrame:frame];
  18. label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline];
  19. label.textColor = [UIColor darkGrayColor];
  20. label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
  21. [self addSubview:label];
  22. _titleLabel = label;
  23. }
  24. return self;
  25. }
  26. + (void)registerInCollectionView:(UICollectionView *)collectionView
  27. {
  28. [collectionView registerClass:self forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:[self identifier]];
  29. }
  30. + (NSString *)identifier
  31. {
  32. return @"VLCPlaybackInfoTrackTVTitleView";
  33. }
  34. @end