VLCAboutViewController.m 1.6 KB

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