UINavigationController+Theme.m 867 B

12345678910111213141516171819202122232425262728
  1. //
  2. // UINavigationController+Theme.m
  3. // VLC for iOS
  4. //
  5. // Created by Romain Goyet on 14/06/13.
  6. // Copyright (c) 2013 Applidium. All rights reserved.
  7. //
  8. // Refer to the COPYING file of the official project for license.
  9. //
  10. #import "UINavigationController+Theme.h"
  11. @implementation UINavigationController (Theme)
  12. - (void)loadTheme
  13. {
  14. UINavigationBar *navBar = self.navigationBar;
  15. if (!SYSTEM_RUNS_IN_THE_FUTURE) {
  16. [navBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"]
  17. forBarMetrics:UIBarMetricsDefault];
  18. navBar.barStyle = UIBarStyleBlack;
  19. } else {
  20. navBar.barTintColor = [UIColor colorWithRed:1.0f green:(132.0f/255.0f) blue:0.0f alpha:1.f];
  21. navBar.tintColor = [UIColor whiteColor];
  22. navBar.titleTextAttributes = @{ UITextAttributeTextColor : [UIColor whiteColor] };
  23. }
  24. }
  25. @end