VLCAboutViewController.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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)dealloc
  18. {
  19. [_textContents release];
  20. [_aspenVersion release];
  21. [_vlckitVersion release];
  22. [_dismissButton 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. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
  36. [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent;
  37. [super viewWillAppear:animated];
  38. }
  39. - (void)viewWillDisappear:(BOOL)animated
  40. {
  41. [self.navigationController setNavigationBarHidden:NO animated:YES];
  42. [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
  43. [super viewWillDisappear:animated];
  44. }
  45. - (IBAction)dismiss:(id)sender
  46. {
  47. [self.navigationController popViewControllerAnimated:YES];
  48. }
  49. @end