AboutViewController.m 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
  11. @property (strong, nonatomic) IBOutlet UILabel *verKeyLabel;
  12. @property (strong, nonatomic) IBOutlet UILabel *verValueLabel;
  13. @property (strong, nonatomic) IBOutlet UILabel *supportKeyLabel;
  14. @property (strong, nonatomic) IBOutlet UITextView *supportValueLabel;
  15. @end
  16. @implementation AboutViewController
  17. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  18. {
  19. self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  20. if (self) {
  21. // Custom initialization
  22. }
  23. return self;
  24. }
  25. - (BOOL)shouldAutorotate
  26. {
  27. return YES;
  28. }
  29. - (UIInterfaceOrientationMask)supportedInterfaceOrientations
  30. {
  31. return UIInterfaceOrientationMaskPortrait;
  32. }
  33. - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
  34. {
  35. return UIInterfaceOrientationPortrait;
  36. }
  37. - (void)viewDidLoad
  38. {
  39. [super viewDidLoad];
  40. // if (@available(iOS 11,*)) {
  41. // self.infoText.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
  42. // } else {
  43. // self.automaticallyAdjustsScrollViewInsets = NO;
  44. // }
  45. NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
  46. NSString* versionNum =[infoDict objectForKey:@"CFBundleVersion"];
  47. versionNum = [NSString stringWithFormat:@"A%@",versionNum];
  48. // self.infoText.text = [NSString stringWithFormat:NSLocalizedString(@"about_appinfo", nil),versionNum];
  49. // Do any additional setup after loading the view.
  50. self.titleLabel.text = NSLocalizedString(@"about_title", nil);
  51. self.verKeyLabel.text = NSLocalizedString(@"about_ver_key", nil);
  52. self.verValueLabel.text = versionNum;
  53. self.supportKeyLabel.text = NSLocalizedString(@"about_support_key",nil);
  54. self.supportValueLabel.text = NSLocalizedString(@"about_support_value", nil);
  55. }
  56. - (void)didReceiveMemoryWarning
  57. {
  58. [super didReceiveMemoryWarning];
  59. // Dispose of any resources that can be recreated.
  60. }
  61. @end