AboutViewController.m 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // AboutViewController.m
  3. // Apex Mobile
  4. //
  5. // Created by Ray on 14-2-26.
  6. // Copyright (c) 2014年 United Software Applications, Inc. All rights reserved.
  7. //
  8. #import "AboutViewController.h"
  9. @interface AboutViewController ()
  10. @end
  11. @implementation AboutViewController
  12. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  13. {
  14. self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  15. if (self) {
  16. // Custom initialization
  17. }
  18. return self;
  19. }
  20. - (BOOL)shouldAutorotate
  21. {
  22. return YES;
  23. }
  24. - (NSUInteger)supportedInterfaceOrientations
  25. {
  26. return UIInterfaceOrientationMaskPortrait;
  27. }
  28. - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
  29. {
  30. return UIInterfaceOrientationPortrait;
  31. }
  32. - (void)viewDidLoad
  33. {
  34. [super viewDidLoad];
  35. NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
  36. NSString* versionNum =[infoDict objectForKey:@"CFBundleVersion"];
  37. versionNum = [NSString stringWithFormat:@"A%@",versionNum];
  38. self.infoText.text = [NSString stringWithFormat:NSLocalizedString(@"about_appinfo", nil),versionNum];
  39. // Do any additional setup after loading the view.
  40. }
  41. - (void)didReceiveMemoryWarning
  42. {
  43. [super didReceiveMemoryWarning];
  44. // Dispose of any resources that can be recreated.
  45. }
  46. @end