// // 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