AboutVC.m 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //
  2. // AboutVC.m
  3. // jiaPei
  4. //
  5. // Created by apple on 15/11/18.
  6. // Copyright (c) 2015年 JCZ. All rights reserved.
  7. //
  8. #import "AboutVC.h"
  9. @interface AboutVC ()
  10. @end
  11. @implementation AboutVC
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. [self myInit];
  15. }
  16. - (void)didReceiveMemoryWarning {
  17. [super didReceiveMemoryWarning];
  18. }
  19. -(void)myInit
  20. {
  21. [self setTitle:@"关于我们"];
  22. self.view.backgroundColor = [UIColor whiteColor];
  23. UIImageView* iv = [[UIImageView alloc] initWithFrame:CGRectMake(0, kNavOffSet, kSize.width, kSize.height-kNavOffSet)];
  24. [iv setImage:[UIImage imageNamed:@"about"]];
  25. [self.view addSubview:iv];
  26. CGFloat x = kSize.width/3.0;
  27. CGFloat w, h;
  28. w = h = x;
  29. UIImageView *logoImg = [[UIImageView alloc] initWithFrame:CGRectMake(x, 50, w, h)];
  30. logoImg.image = [UIImage imageNamed:@"defaultLogo"];
  31. logoImg.layer.masksToBounds = YES;
  32. logoImg.layer.cornerRadius = 3;
  33. [iv addSubview:logoImg];
  34. NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
  35. // app名称
  36. NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];
  37. // app版本
  38. NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
  39. NSString *str = [NSString stringWithFormat:@"%@(%@)",app_Name,app_Version];
  40. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(x - 30, 100 + h + 20, w + 60, 50)];
  41. label.backgroundColor = [UIColor clearColor];
  42. [label setText:str Font:24 TextColor:COLOR_THEME Alignment:NSTextAlignmentCenter];
  43. [iv addSubview:label];
  44. }
  45. @end