About_VC.m 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // About_VC.m
  3. // Haishenghai-master
  4. //
  5. // Created by GG on 2019/1/25.
  6. // Copyright © 2019年 Haishenghai intelligence network technology. All rights reserved.
  7. //
  8. #import "About_VC.h"
  9. #define WIDTH [UIScreen mainScreen].bounds.size.width
  10. #define HEIGHT [UIScreen mainScreen].bounds.size.height
  11. @interface About_VC ()
  12. @end
  13. @implementation About_VC
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. self.navigationItem.title = @"关于我们";
  17. self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:60/255.0 green:114/255.0 blue:255/255.0 alpha:1];
  18. [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
  19. UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  20. [backBtn setImage:[UIImage imageNamed:@"hsh_return"] forState:UIControlStateNormal];
  21. backBtn.frame = CGRectMake(0, 0, 44, 44);
  22. [backBtn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
  23. backBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
  24. self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:backBtn];
  25. self.view.backgroundColor = [UIColor whiteColor];
  26. /** 设置logo */
  27. UIImageView *logoImageView = [[UIImageView alloc]init];
  28. [logoImageView setImage:[UIImage imageNamed:@"logo"]];
  29. logoImageView.frame = CGRectMake(WIDTH/2-55, HEIGHT/4-45, 110, 110);
  30. [self.view addSubview:logoImageView];
  31. UILabel *titleLabel =[[UILabel alloc]init];
  32. titleLabel.frame = CGRectMake(40, HEIGHT/2-60, WIDTH-80, 150);
  33. titleLabel.textAlignment = NSTextAlignmentCenter;
  34. titleLabel.font = [UIFont systemFontOfSize:16];
  35. [self.view addSubview:titleLabel];
  36. titleLabel.numberOfLines = 0;
  37. NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
  38. style.alignment = NSTextAlignmentLeft;
  39. [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
  40. //首行缩进
  41. style.firstLineHeadIndent =36.0f;
  42. NSAttributedString *attrText = [[NSAttributedString alloc]initWithString:@"海盛海智联APP是一款针对九小场所消防设施进行监控的应用软件,能够协助业主进行警情复核,并能够对烟感探测器、用电安全灭火器等设备进行实时监控和智能化管理。通知业主还能够设置警情发生第一时间收到电话、短信等通知,避免更大的损失发生。"attributes:@{NSParagraphStyleAttributeName: style}];
  43. titleLabel.attributedText =attrText;
  44. UILabel *versionLabel =[[UILabel alloc]init];
  45. versionLabel.frame = CGRectMake(WIDTH/2-100, HEIGHT-100, 200, 44);
  46. versionLabel.textAlignment = NSTextAlignmentCenter;
  47. versionLabel.font = [UIFont systemFontOfSize:16];
  48. versionLabel.textColor = [UIColor blackColor];
  49. [self.view addSubview:versionLabel];
  50. versionLabel.text = @"当前版本号:V1.0";
  51. }
  52. -(void)backClick{
  53. [self.navigationController popViewControllerAnimated:YES];
  54. }
  55. - (void)didReceiveMemoryWarning {
  56. [super didReceiveMemoryWarning];
  57. // Dispose of any resources that can be recreated.
  58. }
  59. /*
  60. #pragma mark - Navigation
  61. // In a storyboard-based application, you will often want to do a little preparation before navigation
  62. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  63. // Get the new view controller using [segue destinationViewController].
  64. // Pass the selected object to the new view controller.
  65. }
  66. */
  67. @end