1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//
//  HDLFVCreateTemPassView.m
//  Ezviz
//
//  Created by 陈启扬 on 2022/4/22.
//  Copyright © 2022 hdl. All rights reserved.
//
 
#import "HDLEZCreateTemPassView.h"
@interface HDLEZCreateTemPassView ()
 
@property (nonatomic, strong)UIView *expireV;//无效View
@property (nonatomic, strong)UILabel *expireL;//无效Lable
 
@property (nonatomic, strong)UIScrollView *scrollV;//滚动view
 
@end
@implementation HDLEZCreateTemPassView
 
-(instancetype)init{
    self = [super init];
    if (self) {
//        _isShow=YES;
//        _tempPassword=@"";
        [self initUI];
    }
    
    return  self;
}
 
-(void)initUI{
    //滚动view
    _scrollV=[[UIScrollView alloc] init];
    if (@available(iOS 11.0, *)) {
        _scrollV.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }
    [self addSubview:_scrollV];
    [_scrollV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self);
        make.right.left.bottom.equalTo(self);
    }];
    _scrollV.contentSize=CGSizeMake(HDLEZ_APP_SCREEN_WIDTH, 665);
 
    
    //使用人
    _userV=[[HDLEZNormalCellView alloc] init];
    [_scrollV addSubview:_userV];
    [_userV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_scrollV);
        make.left.right.equalTo(self);
        make.height.mas_equalTo(50);
    }];
    _userV.title= HDLEZLocallizedString(@"device_temp_user");
    _userV.titleL.font=HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_16);
    [_userV.lineV setHidden:YES];
    
    //有效期
    _validV=[[HDLEZNormalCellView alloc] init];
    [_scrollV addSubview:_validV];
    [_validV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_userV.mas_bottom).offset(8);
        make.left.right.equalTo(self);
        make.height.mas_equalTo(50);
    }];
    _validV.title= HDLEZLocallizedString(@"device_temp_valid_date");
    _validV.titleL.textColor=HDLEZ_COLOR_TEXT_LIGHT_BLUE;
    _validV.titleL.font=HDLEZ_Get_FontBoldWithSize(HDLEZ_FontSize_16);
    [_validV hideNextImg];
    
    //生效时间
    _validTimeV=[[HDLEZNormalCellView alloc] init];
    [_scrollV addSubview:_validTimeV];
    [_validTimeV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_validV.mas_bottom);
        make.left.right.equalTo(self);
        make.height.mas_equalTo(50);
    }];
    _validTimeV.title=HDLEZLocallizedString(@"device_temp_valid_begin");
    [_validTimeV hideNextImg];
    _validTimeV.contentL.text=HDLEZLocallizedString(@"device_temp_please_select");
    
    //失效时间
    _expireTimeV=[[HDLEZNormalCellView alloc] init];
    [_scrollV addSubview:_expireTimeV];
    [_expireTimeV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_validTimeV.mas_bottom);
        make.left.right.equalTo(self);
        make.height.mas_equalTo(50);
    }];
    _expireTimeV.title=HDLEZLocallizedString(@"device_temp_valid_end");
    [_expireTimeV.lineV setHidden:YES];
    [_expireTimeV hideNextImg];
    _expireTimeV.contentL.text=HDLEZLocallizedString(@"device_temp_please_select");
 
    //使用次数
    _useCountV=[[HDLEZNormalCellView alloc] init];
    [_scrollV addSubview:_useCountV];
    [_useCountV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_expireTimeV.mas_bottom).offset(8);
        make.left.right.equalTo(self);
        make.height.mas_equalTo(50);
    }];
    _useCountV.title=HDLEZLocallizedString(@"device_temp_use_times");
    [_useCountV.lineV setHidden:YES];
    _useCountV.contentL.text=HDLEZLocallizedString(@"device_temp_unlimited_times");
 
 
    
    
}
 
@end