From f338bb377a9e2f87f876cf8c5f0124d84da85bea Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期三, 15 三月 2023 14:18:40 +0800 Subject: [PATCH] 1.引入自定义button和scrollview 2.引入时间选择器组件 3.完善临时密码功能 4.修改部分类名 --- EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVisitorRecordCell.m | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVisitorRecordCell.m b/EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVisitorRecordCell.m index fb37b13..4858a91 100755 --- a/EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVisitorRecordCell.m +++ b/EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVisitorRecordCell.m @@ -128,10 +128,16 @@ _timeL.text=[NSString stringWithFormat:@"%@ - %@",[self turnDate:tempInfo.beginTime],[self turnDate:tempInfo.endTime]]; //鍓╀綑娆℃暟 - NSString *contentStr=[NSString stringWithFormat:@"%@%@%@",HDLEZLocallizedString(@"device_temp_left"),tempInfo.useCount,HDLEZLocallizedString(@"device_temp_times")]; - NSMutableAttributedString *attributedStringM = [[NSMutableAttributedString alloc] initWithString:contentStr]; - [attributedStringM addAttribute:NSForegroundColorAttributeName value:HDLEZ_COLOR_TITLE_BLACK range:NSMakeRange(contentStr.length-HDLEZLocallizedString(@"device_temp_times").length-tempInfo.useCount.length, tempInfo.useCount.length)]; - _describeL.attributedText=attributedStringM; + if ([tempInfo.useCount isEqualToString:@"-1"]) {//涓嶉檺娆℃暟 + _describeL.text=HDLEZLocallizedString(@"device_temp_unlimited_use_times"); + _describeL.textColor=HDLEZ_COLOR_TITLE_BLACK; + }else{ + NSString *contentStr=[NSString stringWithFormat:@"%@%@%@",HDLEZLocallizedString(@"device_temp_left"),tempInfo.useCount,HDLEZLocallizedString(@"device_temp_times")]; + NSMutableAttributedString *attributedStringM = [[NSMutableAttributedString alloc] initWithString:contentStr]; + [attributedStringM addAttribute:NSForegroundColorAttributeName value:HDLEZ_COLOR_TITLE_BLACK range:NSMakeRange(contentStr.length-HDLEZLocallizedString(@"device_temp_times").length-tempInfo.useCount.length, tempInfo.useCount.length)]; + _describeL.attributedText=attributedStringM; + } + } -- Gitblit v1.8.0