Davin
2023-06-15 011b0cc918bfa0e36a9ad4a0f45c18b801815920
faeture 历史消息
2个文件已添加
10个文件已修改
409 ■■■■■ 已修改文件
EZDemo/HDLEZDemo/HDLEZDemo/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/libEZSDK.a 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/resources/en.lproj/Localizable.strings 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/resources/zh-Hans.lproj/Localizable.strings 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK.xcodeproj/project.pbxproj 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/TempPassword/Controllers/HDLEZDeviceMsgListViewController.m 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZDeviceMsgListView.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZDeviceMsgListView.m 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVideoDoorMsgCell.h 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVideoDoorMsgCell.m 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/Venders/MWPhotoBrowser/MWPhotoBrowser.h 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/Venders/MWPhotoBrowser/MWPhotoBrowser.m 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/Info.plist
@@ -6,6 +6,10 @@
    <string></string>
    <key>NSMicrophoneUsageDescription</key>
    <string>麦克风</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>此 App 需要您的同意才能读取媒体资料库</string>
    <key>NSPhotoLibraryAddUsageDescription</key>
    <string>此 App 需要您的同意才能读取媒体资料库</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
EZDemo/HDLEZDemo/HDLEZDemo/libEZSDK.a
Binary files differ
EZDemo/HDLEZDemo/HDLEZDemo/resources/en.lproj/Localizable.strings
@@ -224,3 +224,4 @@
//通用
"hdl_ez_common_no_data"="No Data";
"hdl_ez_download"="Download";
EZDemo/HDLEZDemo/HDLEZDemo/resources/zh-Hans.lproj/Localizable.strings
@@ -1,11 +1,3 @@
/*
  Localizable.strings
  EZOpenSDK
  Created by linyong on 2017/9/7.
  Copyright © 2017年 Ezviz. All rights reserved.
*/
"done"="确定";
"cancel"="取消";
@@ -35,6 +27,9 @@
"ad_added_by_others"="此设备已被别人添加";
"get_info_fail"="查询失败,网络不给力";
"ad_input_manual"="手动输入";
"ad_result_verify_local_lock"="请在2分钟之内校验已添加的主用户指纹、密钥或感应卡,校验完成请点击已校验按钮";
"ad_verified"="已校验";
"device_camera_list_title"="设备通道列表";
"device_input_vierify_code"="请输入设备验证码";
@@ -71,6 +66,48 @@
"device_password"="密码";
"device_account_pw_empty"="帐号或密码不能为空";
"device_lan_preview_title"="局域网预览";
"device_add_device_qr_code"="设备二维码";
"device_open"="开门";
"device_open_success"="开门成功!";
"device_please_input_door_password"="请输入开锁密码";
"device_history"="历史记录";
"device_his_no_more_data"="没有更多数据";
"device_temp_pass"="临时密码";
"device_temp_year"="年";
"device_temp_month"="月";
"device_temp_date"="日";
"device_temp_left"="剩余";
"device_temp_times"="次";
"device_temp_save"="保存";
"device_temp_user"="使用人";
"device_temp_valid_date"="有效期";
"device_temp_valid_begin"="开始";
"device_temp_valid_end"="结束";
"device_temp_use_times"="使用次数";
"device_temp_please_select"="请选择";
"device_temp_unlimited_times"="不限";
"device_temp_sure"="确认";
"device_temp_cancle"="取消";
"device_temp_please_input"="请输入";
"device_temp_input_use_count_describe"="输入1到100的整数, 为空表示不限次数";
"device_temp_input_pure_number"="请输入纯数字";
"device_temp_input_valid_number"="请输入1-100之间的数字";
"device_temp_unit_year"="年";
"device_temp_unit_month"="月";
"device_temp_unit_date"="日";
"device_temp_unit_hour"="时";
"device_temp_unit_minute"="分";
"device_temp_please_input_user_name"="请输入使用人";
"device_temp_please_select_begin_time"="请选择开始时间";
"device_temp_please_select_end_time"="请选择结束时间";
"device_temp_please_end_time_should_later"="结束时间不得早于开始时间";
"device_temp_unlimited_use_times"="不限次数";
"device_temp_total"="总数";
"device_temp_copied"="已复制";
"device_temp_long_tap_copy"="长按复制临时密码";
"device_temp_sure_to_delete"="确认删除临时密码吗?";
"dmessage_title"="消息";
"message_read"="标记已读";
@@ -129,6 +166,25 @@
"wifi_device_start_ready"="设备已启动好,且是第一次配置网络";
"wifi_config_wifi_ago"="这台设备以前配过网络";
"wifi_config_seria_num"="设备机身上的9位序列号";
"wifi_config_verify_code"="验证码";
"wifi_config_connected"="我已连接好";
"wifi_config_select_set_param"="选择\"设置参数\"";
"wifi_config_select_wifi"="选择\"Wi-Fi\"";
"wifi_config_net_work"="配置网络";
"wifi_config_name"="名称:";
"wifi_config_copy_pwd"="复制密码";
"wifi_config_to_setting"="进入设置页面";
"wifi_config_step_three"="返回APP,等待与设备连接,成功后自动进入下一步操作。";
"wifi_config_tip"="请通过下列步骤将手机连接到设备Wi-Fi:";
"wifi_config_step_three_tip"="(注意:如果设备WIFI名称不是“EZVIZ”前缀的,请复制密码后根据新的前缀名字,手动修改密码的前缀并连接即可。例如“SoftAP_XXXXXXX”)";
"wifi_config_not_connected"="尚未连接网络";
"wifi_config_step_1_tips"="待连接的设备Wi-Fi信息如下:";
"wifi_config_step_2_tips"="如果你使用的是双频路由器,请不要让摄像机连接5G频段的Wi-Fi";
"wifi_config_step_2_next_step"="下一步";
"wifi_config_step_2_net"="网络:";
"wifi_config_step_2_password"="密码:";
"ui_last_update"="最后更新:";
"ui_last_update_empty"="最后更新:无记录";
"ui_just_now"="刚刚";
@@ -166,3 +222,7 @@
//2021-01-27 新增
"Devicelist"="设备列表";
"Logout"="注销";
//通用
"hdl_ez_common_no_data"="暂无数据";
"hdl_ez_download"="下载";
EZSDK/EZSDK.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
    objects = {
/* Begin PBXBuildFile section */
        830957C32A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 830957C22A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m */; };
        AE31FE1F29CC2D2200678568 /* EZOpenSDKFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE31FE1E29CC2D2200678568 /* EZOpenSDKFramework.framework */; platformFilter = ios; };
        AE5068D829B9DB5E009EA09A /* HDLEZTemInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = AE5068D729B9DB5E009EA09A /* HDLEZTemInfoModel.m */; };
        AEC306D229B9F2B5000B3861 /* HDLEZVisitorRecordView.m in Sources */ = {isa = PBXBuildFile; fileRef = AEC306D129B9F2B5000B3861 /* HDLEZVisitorRecordView.m */; };
@@ -184,6 +185,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
        830957C12A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZVideoDoorMsgCell.h; sourceTree = "<group>"; };
        830957C22A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZVideoDoorMsgCell.m; sourceTree = "<group>"; };
        AE31FE1E29CC2D2200678568 /* EZOpenSDKFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = EZOpenSDKFramework.framework; sourceTree = "<group>"; };
        AE5068D629B9DB5E009EA09A /* HDLEZTemInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZTemInfoModel.h; sourceTree = "<group>"; };
        AE5068D729B9DB5E009EA09A /* HDLEZTemInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZTemInfoModel.m; sourceTree = "<group>"; };
@@ -661,6 +664,8 @@
                AEDBFBA129C302E0005F6512 /* HDLEZDeviceMsgListView.m */,
                AEDBFBA329C3072D005F6512 /* HDLEZDeviceMsgCell.h */,
                AEDBFBA429C3072D005F6512 /* HDLEZDeviceMsgCell.m */,
                830957C12A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.h */,
                830957C22A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m */,
            );
            path = Views;
            sourceTree = "<group>";
@@ -1567,6 +1572,7 @@
                B9EA4E8B25C7E806000FFDA2 /* MJRefreshBackStateFooter.m in Sources */,
                B9BC99A125C0FFBD00C024FE /* DDCollectionViewFlowLayout.m in Sources */,
                B9BC9A1E25C0FFBD00C024FE /* EZWifiInfoViewController.m in Sources */,
                830957C32A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m in Sources */,
                AEF0148F29C188ED00D014FD /* HDLEZScrollView.m in Sources */,
                B9BC9A1925C0FFBD00C024FE /* EZAPWiFiConfigViewController.m in Sources */,
                B95AB88826984DD5007BC8D7 /* YYClassInfo.m in Sources */,
EZSDK/EZSDK/EZ/TempPassword/Controllers/HDLEZDeviceMsgListViewController.m
@@ -10,7 +10,10 @@
#import "MJRefreshNormalHeader.h"
#import "MJRefreshAutoNormalFooter.h"
#import "HDLEZDevMsgListModel.h"
@interface HDLEZDeviceMsgListViewController ()
#import "MWPhotoBrowser.h"
#import "SDWebImageManager.h"
#import <Photos/Photos.h>
@interface HDLEZDeviceMsgListViewController ()<MWPhotoBrowserDelegate>
@property (nonatomic, strong) HDLEZDeviceMsgListView *msgListV;//消息列表view
@property (nonatomic, strong) MJRefreshNormalHeader *header;//刷新header
@@ -25,6 +28,8 @@
@property (nonatomic, assign) NSInteger pageSize;//分页容量
@property (nonatomic, strong) NSMutableArray <MWPhoto *>*photos;   // 预览图片信息
@end
@implementation HDLEZDeviceMsgListViewController
@@ -45,7 +50,10 @@
        make.top.equalTo(self.view).offset(HDLEZ_APP_TOP_BAR_HEIGHT);
        make.left.bottom.right.equalTo(self.view);
    }];
//    _msgListV.choseDelegate=self;
    __weak __typeof(self)weakSelf = self;
    [_msgListV previewPicture:^(NSString * _Nonnull pictureUrl) {
        [weakSelf previewPictureWithUrl:pictureUrl];
    }];
    
    //下拉刷新
    // 设置回调(一旦进入刷新状态,就调用target的action,也就是调用self的loadNewData方法)
@@ -117,5 +125,67 @@
    }];
}
#pragma mark MWPhotoBrowserDelegate
- (NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser {
    return self.photos.count;
}
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index {
    if (index < self.photos.count) {
        return [self.photos objectAtIndex:index];
    }
    return nil;
}
- (void)didClickCurrentPhotoBrowserBlank:(MWPhotoBrowser *)photoBrowser {
    [self.navigationController popToViewController:self animated:NO];
}
- (void)didClickDownLoad:(MWPhotoBrowser *)photoBrowser {
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        NSURL *url = [NSURL URLWithString:@"https://upload-images.jianshu.io/upload_images/5809200-a99419bb94924e6d.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"];
        SDWebImageManager *manager = [SDWebImageManager sharedManager];
        UIImage *img;
        if ([manager diskImageExistsForURL:url]) {
            img =  [[manager imageCache] imageFromDiskCacheForKey:url.absoluteString];
        } else {
            //从网络下载图片
            NSData *data = [NSData dataWithContentsOfURL:url];
            img = [UIImage imageWithData:data];
        }
        // 保存图片到相册中
        dispatch_async(dispatch_get_main_queue(), ^{
            UIImageWriteToSavedPhotosAlbum(img,self, @selector(image:didFinishSavingWithError
                                                               :contextInfo:),nil);
        });
    });
}
//保存图片完成之后的回调
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error
  contextInfo:(void *)contextInfo {
    // Was there an error?
    NSString *message = nil;
    if (!error) {
        message = NSLocalizedString(@"device_save_gallery", @"已保存至手机相册");
    }
    else
    {
        message = [error description];
    }
    [UIView dd_showMessage:message];
}
#pragma mark PrivateMethod
- (void)previewPictureWithUrl:(NSString *)picUrl {
    self.photos = [NSMutableArray array];
    [self.photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:picUrl]]];
    MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self];
    [browser showDownloadBtn];
    [self.navigationController pushViewController:browser animated:NO];
}
@end
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZDeviceMsgListView.h
@@ -11,6 +11,10 @@
@interface HDLEZDeviceMsgListView : UITableView<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) NSArray<HDLEZDeviceMsgInfoModel*> *msgList;//消息列表
///   - previewPic: 预览图片回调
- (void)previewPicture:(void(^)(NSString *pictureUrl))previewPic;
@end
NS_ASSUME_NONNULL_END
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZDeviceMsgListView.m
@@ -7,6 +7,14 @@
#import "HDLEZDeviceMsgListView.h"
#import "HDLEZDeviceMsgCell.h"
#import "HDLEZVideoDoorMsgCell.h"
@interface HDLEZDeviceMsgListView ()
@property (copy, nonatomic) void(^previewPic)(NSString *pictureUrl);
@end
@implementation HDLEZDeviceMsgListView{
    CGFloat cellHeight;
}
@@ -21,7 +29,7 @@
        self.showsVerticalScrollIndicator=NO;
        self.delegate = self;
        self.dataSource = self;
        cellHeight=65;
        cellHeight=80;
        [self setSeparatorInset:UIEdgeInsetsZero];
//        [self setLayoutMargins:UIEdgeInsetsZero];
    }
@@ -43,18 +51,48 @@
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    HDLEZLog(@"初始化cell");
    HDLEZDeviceMsgCell *cell = [tableView dequeueReusableCellWithIdentifier:@"HDLEZDeviceMsgCell"];
    HDLEZVideoDoorMsgCell *cell = [tableView dequeueReusableCellWithIdentifier:@"HDLEZVideoDoorMsgCell"];
    if(cell == nil){
        cell=[[HDLEZDeviceMsgCell alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, cellHeight)];
        cell=[[HDLEZVideoDoorMsgCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"HDLEZVideoDoorMsgCell"];
    }
    HDLEZDeviceMsgInfoModel *model=self.msgList[indexPath.row];
    cell.msgInfo=model;
    [self configCell:cell indexPath:indexPath];
//    HDLEZDeviceMsgCell *cell = [tableView dequeueReusableCellWithIdentifier:@"HDLEZDeviceMsgCell"];
//    if(cell == nil){
//        cell=[[HDLEZDeviceMsgCell alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, cellHeight)];
//    }
//    HDLEZDeviceMsgInfoModel *model=self.msgList[indexPath.row];
//    cell.msgInfo=model;
//    HDLEZLog(@"初始化cell ID:%@",model.extVisitorId);
    
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    if (self.msgList.count <= indexPath.row) return;
    HDLEZDeviceMsgInfoModel *messageModel = self.msgList[indexPath.row];
#warning mock
    NSString *tempPicUrl = @"https://upload-images.jianshu.io/upload_images/5809200-a99419bb94924e6d.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240";
    if (self.previewPic) {
        self.previewPic(tempPicUrl);
    }
}
#pragma mark - PublishMethod
- (void)previewPicture:(void(^)(NSString *pictureUrl))previewPic {
    self.previewPic = previewPic;
}
#pragma mark - PrivateMethod
- (void)configCell:(HDLEZVideoDoorMsgCell *)cell indexPath:(NSIndexPath *)indexPath {
    if (self.msgList.count <= indexPath.row) return;
    HDLEZDeviceMsgInfoModel *messageModel = self.msgList[indexPath.row];
#warning mock
    NSString *tempPicUrl = @"https://upload-images.jianshu.io/upload_images/5809200-a99419bb94924e6d.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240";
    [cell configMessageInfoWithTitle:messageModel.title deviceStatus:@"未接听" messageTime:messageModel.createTime messageImage:tempPicUrl];
}
/*设置消息列表值
 */
-(void)setMsgList:(NSArray<HDLEZDeviceMsgInfoModel *> *)msgList{
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVideoDoorMsgCell.h
New file
@@ -0,0 +1,24 @@
//
//  HDLEZVideoDoorMsgCell.h
//  EZSDK
//
//  Created by Davin on 2023/6/15.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface HDLEZVideoDoorMsgCell : UITableViewCell
/// 配置门锁历史消息记录
/// - Parameters:
///   - title: 消息标题
///   - deviceStatus: 设备状态
///   - time: 消息生成时间
///   - messageUrl: 消息图片
- (void)configMessageInfoWithTitle:(NSString *)title deviceStatus:(NSString *)deviceStatus messageTime:(NSString *)time messageImage:(NSString *)messageUrl;
@end
NS_ASSUME_NONNULL_END
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVideoDoorMsgCell.m
New file
@@ -0,0 +1,122 @@
//
//  HDLEZVideoDoorMsgCell.m
//  EZSDK
//
//  Created by Davin on 2023/6/15.
//
#import "HDLEZVideoDoorMsgCell.h"
@interface HDLEZVideoDoorMsgCell ()
@property (strong, nonatomic) UILabel *messageTitle;
@property (strong, nonatomic) UILabel *statusLabel;
@property (strong, nonatomic) UILabel *timeLabel;
@property (strong, nonatomic) UIImageView *messageImageView;
@end
@implementation HDLEZVideoDoorMsgCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self createSubviews];
    }
    return self;
}
- (void)createSubviews {
    self.contentView.backgroundColor = UIColor.whiteColor;
    [self.contentView addSubview:self.messageTitle];
    [self.contentView addSubview:self.statusLabel];
    [self.contentView addSubview:self.timeLabel];
    [self.contentView addSubview:self.messageImageView];
    [self.messageTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView.mas_top).offset(16.);
        make.left.mas_equalTo(self.contentView.mas_left).offset(16.);
        make.height.mas_equalTo(22);
    }];
    [self.statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.messageTitle.mas_bottom).offset(10.);
        make.left.mas_equalTo(self.messageTitle.mas_left);
        make.width.mas_equalTo(50);
        make.height.mas_equalTo(30);
    }];
    [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.messageTitle.mas_left);
        make.bottom.mas_equalTo(self.messageImageView.mas_bottom);
        make.right.mas_equalTo(self.messageTitle.mas_right);
        make.height.mas_equalTo(22);
    }];
    [self.messageImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView.mas_top).offset(16.);
        make.left.mas_equalTo(self.messageTitle.mas_right).offset(10.);
        make.bottom.mas_equalTo(self.contentView.mas_bottom).offset(-16.);
        make.right.mas_equalTo(self.contentView.mas_right).offset(-16.);
        make.width.mas_equalTo(self.messageImageView.mas_height).multipliedBy(5/3.);
    }];
}
#pragma mark - PublishMethod
- (void)configMessageInfoWithTitle:(NSString *)title deviceStatus:(NSString *)deviceStatus messageTime:(NSString *)time messageImage:(NSString *)messageUrl {
    if (title && title.length > 0) {
        self.messageTitle.text = title;
    }
    if (deviceStatus && deviceStatus.length > 0) {
        self.statusLabel.text = deviceStatus;
    }
    if (time && time.length > 0) {
        self.timeLabel.text = time;
    }
    if (messageUrl && messageUrl.length > 0) {
        NSLog(@"#######cell image url:%@", messageUrl);
        [self.messageImageView sd_setImageWithURL:[NSURL URLWithString:messageUrl] placeholderImageScale:[UIImage imageNamed:@""]];
    }
}
#pragma mark - Getter
- (UILabel *)messageTitle {
    if (!_messageTitle) {
        _messageTitle=[[UILabel alloc] init];
        _messageTitle.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14);
        _messageTitle.textColor=HDLEZ_COLOR_TITLE_BLACK;
    }
    return _messageTitle;
}
- (UILabel *)statusLabel {
    if (!_statusLabel) {
        _statusLabel=[[UILabel alloc] init];
        _statusLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_12);
        _statusLabel.textColor = HDLEZ_COLOR_TEXT_LIGHT_GRAY;
        _statusLabel.layer.cornerRadius = 5;
        _statusLabel.layer.borderColor = HDLEZ_COLOR_TEXT_GRAY.CGColor;
        _statusLabel.clipsToBounds = YES;
    }
    return _statusLabel;
}
- (UILabel *)timeLabel {
    if (!_timeLabel) {
        _timeLabel=[[UILabel alloc] init];
        _timeLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_12);
        _timeLabel.textColor=HDLEZ_COLOR_TEXT_GRAY;
        _timeLabel.textAlignment = NSTextAlignmentRight;
    }
    return _timeLabel;
}
- (UIImageView *)messageImageView {
    if (!_messageImageView) {
        _messageImageView = [[UIImageView alloc] init];
        _messageImageView.backgroundColor = HDLEZ_COLOR_TEXT_LIGHT_GRAY;
    }
    return _messageImageView;
}
@end
EZSDK/EZSDK/EZ/Venders/MWPhotoBrowser/MWPhotoBrowser.h
@@ -35,6 +35,13 @@
- (BOOL)photoBrowser:(MWPhotoBrowser *)photoBrowser isPhotoSelectedAtIndex:(NSUInteger)index;
- (void)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index selectedChanged:(BOOL)selected;
- (void)photoBrowserDidFinishModalPresentation:(MWPhotoBrowser *)photoBrowser;
/// OnPro2.0版本添加单击事件
/// - Parameter photoBrowser: 当前图片对象
- (void)didClickCurrentPhotoBrowserBlank:(MWPhotoBrowser *)photoBrowser;
/// OnPro2.0版本添加下载功能
/// - Parameter photoBrowser: 当前预览对象
- (void)didClickDownLoad:(MWPhotoBrowser *)photoBrowser;
@end
@@ -72,4 +79,8 @@
- (void)showNextPhotoAnimated:(BOOL)animated;
- (void)showPreviousPhotoAnimated:(BOOL)animated;
// Expansion
/// 展示下载按钮 OnPro2.0 添加于 23.06.15
- (void)showDownloadBtn;
@end
EZSDK/EZSDK/EZ/Venders/MWPhotoBrowser/MWPhotoBrowser.m
@@ -17,6 +17,12 @@
static void * MWVideoPlayerObservation = &MWVideoPlayerObservation;
@interface MWPhotoBrowser ()
@property (nonatomic, strong) UIButton *downloadBtn;
@end
@implementation MWPhotoBrowser
#pragma mark - Init
@@ -1503,7 +1509,12 @@
- (BOOL)areControlsHidden { return (_toolbar.alpha == 0); }
- (void)hideControls { [self setControlsHidden:YES animated:YES permanent:NO]; }
- (void)showControls { [self setControlsHidden:NO animated:YES permanent:NO]; }
- (void)toggleControls { [self setControlsHidden:![self areControlsHidden] animated:YES permanent:NO]; }
- (void)toggleControls {
    [self setControlsHidden:![self areControlsHidden] animated:YES permanent:NO];
    if ([self.delegate respondsToSelector:@selector(didClickCurrentPhotoBrowserBlank:)]) {
        [self.delegate didClickCurrentPhotoBrowserBlank:self];
    }
}
#pragma mark - Properties
@@ -1639,4 +1650,30 @@
    self.navigationController.navigationBar.userInteractionEnabled = YES;
}
- (UIButton *)downloadBtn {
    if (!_downloadBtn) {
        _downloadBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_downloadBtn setTitle:HDLEZLocallizedString(@"hdl_ez_download") forState:UIControlStateNormal];
        [_downloadBtn setTitleColor:HDLEZ_COLOR_TEXT_LIGHT_GRAY forState:UIControlStateNormal];
    }
    return _downloadBtn;
}
- (void)showDownloadBtn {
    [self.view addSubview:self.downloadBtn];
    [self.downloadBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.view.mas_left).offset(32.);
        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-HDLEZ_APP_TAB_BOTTOM_HEIGHT - 16);
        make.width.mas_equalTo((HDLEZ_APP_SCREEN_WIDTH - 96) / 2.);
        make.height.mas_equalTo(50.);
    }];
    [self.downloadBtn addTarget:self action:@selector(downLoadAction) forControlEvents:UIControlEventTouchUpInside];
}
- (void)downLoadAction {
    if (self.delegate && [self.delegate respondsToSelector:@selector(didClickDownLoad:)]) {
        [self.delegate didClickDownLoad:self];
    }
}
@end