VLCAboutViewController.m 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.dismissButton.style = UIBarButtonItemStyleDone;
  22. self.textContents.text = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"About Contents" ofType:@"txt"] encoding:NSUTF8StringEncoding error:nil];
  23. self.aspenVersion.text = [[NSString stringWithFormat:NSLocalizedString(@"VERSION_FORMAT",@""), [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] stringByAppendingFormat:@" %@", kVLCVersionCodename];
  24. self.vlckitVersion.text = [NSString stringWithFormat:NSLocalizedString(@"BASED_ON_FORMAT",@""),[[VLCLibrary sharedLibrary] version]];
  25. }
  26. - (void)viewWillAppear:(BOOL)animated
  27. {
  28. [self.navigationController setNavigationBarHidden:YES animated:NO];
  29. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
  30. [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent;
  31. [super viewWillAppear:animated];
  32. }
  33. - (void)viewWillDisappear:(BOOL)animated
  34. {
  35. [self.navigationController setNavigationBarHidden:NO animated:YES];
  36. [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
  37. [super viewWillDisappear:animated];
  38. }
  39. - (IBAction)dismiss:(id)sender
  40. {
  41. [self.navigationController popViewControllerAnimated:YES];
  42. }
  43. @end