AboutVC.m 1.7 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 configNavigationBar];
  23. self.view.backgroundColor = [UIColor whiteColor];
  24. UIImageView* iv = [[UIImageView alloc] initWithFrame:CGRectMake(0, -kNavOffSet, kSize.width, kSize.height)];
  25. [iv setImage:[UIImage imageNamed:@"about"]];
  26. [self.view addSubview:iv];
  27. CGFloat x = kSize.width/3.0;
  28. CGFloat w, h;
  29. w = h = x;
  30. UIImageView *logoImg = [[UIImageView alloc] initWithFrame:CGRectMake(x, kNavOffSet+40, w, h)];
  31. logoImg.image = [UIImage imageNamed:@"ln_stu"];
  32. logoImg.layer.masksToBounds = YES;
  33. logoImg.layer.cornerRadius = h*0.1754;;
  34. [iv addSubview:logoImg];
  35. NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
  36. // app名称
  37. NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];
  38. // app版本
  39. NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
  40. NSString *str = [NSString stringWithFormat:@"%@(%@)",app_Name,app_Version];
  41. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(x - 30, CGRectGetMaxY(logoImg.frame) + 20, w + 60, 50)];
  42. label.backgroundColor = [UIColor clearColor];
  43. [label setText:str Font:24 TextColor:RGB_COLOR(229, 79, 22) Alignment:NSTextAlignmentCenter];
  44. [iv addSubview:label];
  45. }
  46. @end