ProblemViewController.m 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // ProblemViewController.m
  3. // Haishenghai-master
  4. //
  5. // Created by GG on 2019/1/4.
  6. // Copyright © 2019年 Haishenghai intelligence network technology. All rights reserved.
  7. //
  8. #import "ProblemViewController.h"
  9. @interface ProblemViewController ()
  10. @end
  11. @implementation ProblemViewController
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. // Do any additional setup after loading the view.
  15. self.navigationItem.title = @"常见问题";
  16. self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:60/255.0 green:114/255.0 blue:255/255.0 alpha:1];
  17. [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
  18. UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  19. [backBtn setImage:[UIImage imageNamed:@"hsh_return"] forState:UIControlStateNormal];
  20. backBtn.frame = CGRectMake(0, 0, 44, 44);
  21. [backBtn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
  22. backBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
  23. self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:backBtn];
  24. WKWebView *webView = [[WKWebView alloc] initWithFrame:self.view.bounds];
  25. [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.hsh-iot.com/app_page/index.html"]]];
  26. [self.view addSubview:webView];
  27. }
  28. -(void)backClick{
  29. [self.navigationController popViewControllerAnimated:YES];
  30. }
  31. - (void)didReceiveMemoryWarning {
  32. [super didReceiveMemoryWarning];
  33. // Dispose of any resources that can be recreated.
  34. }
  35. /*
  36. #pragma mark - Navigation
  37. // In a storyboard-based application, you will often want to do a little preparation before navigation
  38. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  39. // Get the new view controller using [segue destinationViewController].
  40. // Pass the selected object to the new view controller.
  41. }
  42. */
  43. @end