VLCAboutViewController.m 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // VLCAboutViewController.m
  3. // AspenProject
  4. //
  5. // Created by Felix Paul Kühne on 07.04.13.
  6. // Copyright (c) 2013 VideoLAN. All rights reserved.
  7. //
  8. #import "VLCAboutViewController.h"
  9. @interface VLCAboutViewController ()
  10. @end
  11. @implementation VLCAboutViewController
  12. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  13. {
  14. self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  15. return self;
  16. }
  17. - (void)viewDidLoad
  18. {
  19. [super viewDidLoad];
  20. self.dismissButton.title = NSLocalizedString(@"BUTTON_DONE", @"");
  21. self.textContents.text = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"About Contents" ofType:@"txt"] encoding:NSUTF8StringEncoding error:nil];
  22. self.aspenVersion.text = [NSString stringWithFormat:NSLocalizedString(@"VERSION_FORMAT",@""), [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
  23. self.vlckitVersion.text = [NSString stringWithFormat:NSLocalizedString(@"BASED_ON_FORMAT",@""),[[VLCLibrary sharedLibrary] version]];
  24. }
  25. - (void)viewWillAppear:(BOOL)animated
  26. {
  27. [self.navigationController setNavigationBarHidden:YES animated:NO];
  28. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
  29. [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent;
  30. [super viewWillAppear:animated];
  31. }
  32. - (void)viewWillDisappear:(BOOL)animated
  33. {
  34. [self.navigationController setNavigationBarHidden:NO animated:YES];
  35. [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
  36. [super viewWillDisappear:animated];
  37. }
  38. - (IBAction)dismiss:(id)sender
  39. {
  40. [self.navigationController popViewControllerAnimated:YES];
  41. }
  42. @end