AlarmMessagePicViewController.m 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // AlarmMessagePicViewController.m
  3. // FunSDKDemo
  4. //
  5. // Created by wujiangbo on 2018/12/3.
  6. // Copyright © 2018 wujiangbo. All rights reserved.
  7. //
  8. #import "AlarmMessagePicViewController.h"
  9. #import <Masonry/Masonry.h>
  10. #import "Header.h"
  11. @interface AlarmMessagePicViewController ()
  12. @end
  13. @implementation AlarmMessagePicViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. self.view.backgroundColor = [UIColor whiteColor];
  17. //设置导航栏样式
  18. [self setNaviStyle];
  19. //布局
  20. [self.view addSubview:self.imageV];
  21. [self configSubviews];
  22. }
  23. - (void)setNaviStyle {
  24. self.navigationItem.title = TS("Alarm_picture");
  25. UIBarButtonItem *leftBtn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"new_back.png"] style:UIBarButtonItemStylePlain target:self action:@selector(popViewController)];
  26. self.navigationItem.leftBarButtonItem = leftBtn;
  27. }
  28. -(void)configSubviews{
  29. [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
  30. make.width.equalTo(self.view);
  31. make.height.equalTo(self.view.mas_width).multipliedBy(0.6);
  32. make.centerY.equalTo(self.view.mas_centerY);
  33. make.left.equalTo(self);
  34. }];
  35. }
  36. #pragma mark - button event
  37. #pragma mark 点击返回上层
  38. -(void)popViewController{
  39. [self.navigationController popViewControllerAnimated:YES];
  40. }
  41. #pragma mark - lazyload
  42. - (UIImageView *)imageV{
  43. if (!_imageV) {
  44. _imageV = [[UIImageView alloc] init];
  45. _imageV.image = [UIImage imageNamed:@"icon_funsdk.png"];
  46. }
  47. return _imageV;
  48. }
  49. @end