VLCAboutViewController.m 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. @synthesize textContents=_textContents, aspenVersion=_aspenVersion, vlckitVersion=_vlckitVersion;
  13. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  14. {
  15. self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  16. return self;
  17. }
  18. - (void)dealloc
  19. {
  20. [_textContents release];
  21. [_aspenVersion release];
  22. [_vlckitVersion release];
  23. [super dealloc];
  24. }
  25. - (void)viewDidLoad
  26. {
  27. [super viewDidLoad];
  28. self.textContents.text = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"About Contents" ofType:@"txt"] encoding:NSUTF8StringEncoding error:nil];
  29. self.aspenVersion.text = [NSString stringWithFormat:@"Version: %@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
  30. self.vlckitVersion.text = [NSString stringWithFormat:@"Based on:\n%@",[[VLCLibrary sharedLibrary] version]];
  31. }
  32. - (void)viewWillAppear:(BOOL)animated
  33. {
  34. [self.navigationController setNavigationBarHidden:YES animated:NO];
  35. [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent;
  36. [super viewWillAppear:animated];
  37. }
  38. - (void)viewWillDisappear:(BOOL)animated
  39. {
  40. [self.navigationController setNavigationBarHidden:NO animated:YES];
  41. [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
  42. [super viewWillDisappear:animated];
  43. }
  44. - (IBAction)dismiss:(id)sender
  45. {
  46. [self.navigationController popViewControllerAnimated:YES];
  47. }
  48. @end