AboutViewController.m 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. // AboutViewController.m
  3. // RedAnt ERP Mobile
  4. //
  5. // Created by Ray on 10/21/15.
  6. // Copyright © 2015 United Software Applications, Inc. All rights reserved.
  7. //
  8. #import "AboutViewController.h"
  9. #import "config.h"
  10. @interface AboutViewController ()
  11. @end
  12. @implementation AboutViewController
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. // self.edgesForExtendedLayout = UIRectEdgeNone;
  16. // Do any additional setup after loading the view.
  17. UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"close"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
  18. style:UIBarButtonItemStylePlain
  19. target:self
  20. action:@selector( onCloseClick:)];
  21. self.navigationItem.rightBarButtonItem = closeButton;
  22. // self.navigationController.navigationBar.barTintColor = UIColor.blackColor;
  23. // self.navigationController.navigationBar.backgroundColor = UIColor.whiteColor;
  24. NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
  25. NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
  26. NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
  27. //#if defined(BUILD_NPD) || defined(BUILD_USAI)
  28. // NSString* versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
  29. //#endif
  30. //
  31. //#ifdef BUILD_HMLG
  32. // NSString* versionNum = [NSString stringWithFormat:@"Version: HOMELEGANCE %@ Build %@",version,build];
  33. //#endif
  34. NSString* versionNum = [NSString stringWithFormat:@"Version: %@ %@ Build %@",COMPANY_SHORT_NAME,version,build];
  35. self.labelVer.text = versionNum;
  36. self.label_appname.text=APP_NAME;
  37. self.label_company.text=COMPANY_NAME;
  38. self.tvcompany.text=COMPANY_INFO;
  39. }
  40. - (void)onCloseClick:(UIButton *)sender {
  41. [self dismissViewControllerAnimated:true completion:nil];
  42. }
  43. - (void)didReceiveMemoryWarning {
  44. [super didReceiveMemoryWarning];
  45. // Dispose of any resources that can be recreated.
  46. }
  47. /*
  48. #pragma mark - Navigation
  49. // In a storyboard-based application, you will often want to do a little preparation before navigation
  50. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  51. // Get the new view controller using [segue destinationViewController].
  52. // Pass the selected object to the new view controller.
  53. }
  54. */
  55. @end