VLCEmptyLibraryView.m 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*****************************************************************************
  2. * VLCEmptyLibraryView.m
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2018 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Mike JS. Choi <mkchoi212 # icloud.com>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. #import <Foundation/Foundation.h>
  13. #import "VLCEmptyLibraryView.h"
  14. #import "VLCFirstStepsViewController.h"
  15. #import "VLC-Swift.h"
  16. @implementation VLCEmptyLibraryView
  17. - (void)awakeFromNib
  18. {
  19. _emptyLibraryLabel.text = NSLocalizedString(@"EMPTY_LIBRARY", nil);
  20. _emptyLibraryLongDescriptionLabel.text = NSLocalizedString(@"EMPTY_LIBRARY_LONG", nil);
  21. [_learnMoreButton setTitle:NSLocalizedString(@"BUTTON_LEARN_MORE", nil) forState:UIControlStateNormal];
  22. [[NSNotificationCenter defaultCenter] addObserver:self
  23. selector:@selector(themeDidChange)
  24. name:kVLCThemeDidChangeNotification
  25. object:nil];
  26. [self themeDidChange];
  27. [super awakeFromNib];
  28. }
  29. - (IBAction)learnMore:(id)sender
  30. {
  31. UIViewController *firstStepsVC = [[VLCFirstStepsViewController alloc] initWithNibName:nil bundle:nil];
  32. UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:firstStepsVC];
  33. navCon.modalPresentationStyle = UIModalPresentationFormSheet;
  34. [self.window.rootViewController presentViewController:navCon animated:YES completion:nil];
  35. }
  36. - (void)themeDidChange
  37. {
  38. _emptyLibraryLabel.textColor = PresentationTheme.current.colors.cellTextColor;
  39. _emptyLibraryLongDescriptionLabel.textColor = PresentationTheme.current.colors.lightTextColor;
  40. }
  41. @end