QualificationsVC.m 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // QualificationsVC.m
  3. // yunbaolive
  4. //
  5. // Created by ybRRR on 2020/3/11.
  6. // Copyright © 2020 cat. All rights reserved.
  7. //
  8. #import "QualificationsVC.h"
  9. @interface QualificationsVC ()
  10. @end
  11. @implementation QualificationsVC
  12. - (UIStatusBarStyle)preferredStatusBarStyle {
  13. if (@available(iOS 13.0,*)) {
  14. return UIStatusBarStyleDarkContent;
  15. }
  16. return UIStatusBarStyleDefault;
  17. }
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. self.titleL.text = YZMsg(@"资质证明");
  21. self.view.backgroundColor = UIColor.whiteColor;
  22. self.subNavi.backgroundColor = UIColor.whiteColor;
  23. self.titleL.textColor = UIColor.blackColor;
  24. [self.leftBtn setImage:[UIImage imageNamed:@"pub_back_black"] forState:0];
  25. self.naviLine.hidden = NO;
  26. self.naviLine.backgroundColor = RGB(245, 245, 245);
  27. [self createUI];
  28. }
  29. -(void)createUI{
  30. UILabel *contentLb = [[UILabel alloc]init];
  31. contentLb.font = [UIFont systemFontOfSize:14];
  32. contentLb.textColor = [UIColor blackColor];
  33. contentLb.numberOfLines = 0;
  34. contentLb.lineBreakMode = NSLineBreakByWordWrapping;
  35. contentLb.text = minstr([self.infos valueForKey:@"certificate_desc"]);
  36. [self.view addSubview:contentLb];
  37. [contentLb mas_makeConstraints:^(MASConstraintMaker *make) {
  38. make.left.equalTo(self.view).offset(15);
  39. make.right.equalTo(self.view).offset(-15);
  40. make.top.equalTo(self.view).offset(64+statusbarHeight+20);
  41. }];
  42. UIImageView *img = [[UIImageView alloc]init];
  43. img.contentMode = UIViewContentModeScaleAspectFit;
  44. NSString *urls = minstr([self.infos valueForKey:@"certificate"]);
  45. [img sd_setImageWithURL:[NSURL URLWithString:urls]];
  46. [self.view addSubview:img];
  47. [img mas_makeConstraints:^(MASConstraintMaker *make) {
  48. make.width.mas_equalTo(300);
  49. make.height.mas_equalTo(425);
  50. make.top.equalTo(contentLb.mas_bottom).offset(10);
  51. make.centerX.equalTo(self.view.mas_centerX);
  52. }];
  53. }
  54. @end