Forráskód Böngészése

1.剪贴板功能

huangxiaodong 1 hete%!(EXTRA string=óta)
szülő
commit
03059f8652

+ 1 - 0
创维盒子/code/AppDelegate/Config/ColorDefine.h

@@ -52,6 +52,7 @@
 #define HW111111Color [UIColor hwColor:@"#111111"]
 #define HWECECECColor [UIColor hwColor:@"#ECECEC"]
 #define HW9D9D9DColor [UIColor hwColor:@"#9D9D9D"]
+#define HW3370FFColor [UIColor hwColor:@"#3370FF"]
 
 #define COLOR_DISABLE_BTN         RGBACOLOR(0x08,0x86,0xF5,0.3)
 #define COLOR_ENABLE_BTN          RGBACOLOR(36,99,251,1)

+ 22 - 0
创维盒子/code/Assets.xcassets/cloudPhone/jianqieban_guanbi_icon.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "jianqieban_guanbi_icon@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "jianqieban_guanbi_icon@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
创维盒子/code/Assets.xcassets/cloudPhone/jianqieban_guanbi_icon.imageset/jianqieban_guanbi_icon@2x.png


BIN
创维盒子/code/Assets.xcassets/cloudPhone/jianqieban_guanbi_icon.imageset/jianqieban_guanbi_icon@3x.png


+ 22 - 0
创维盒子/code/Assets.xcassets/cloudPhone/jianqiebankong_icon.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "jianqiebankong_icon@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "jianqiebankong_icon@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
创维盒子/code/Assets.xcassets/cloudPhone/jianqiebankong_icon.imageset/jianqiebankong_icon@2x.png


BIN
创维盒子/code/Assets.xcassets/cloudPhone/jianqiebankong_icon.imageset/jianqiebankong_icon@3x.png


+ 28 - 0
创维盒子/code/CloudPlayer/View/PasteSelectView.h

@@ -0,0 +1,28 @@
+//
+//  PasteSelectView.h
+//  VclustersGemini
+//
+//  Created by APPLE on 2019/7/5.
+//  Copyright © 2019 APPLE. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class PasteSelectView;
+NS_ASSUME_NONNULL_BEGIN
+@protocol PasteSelectViewDelegate <NSObject>
+
+@optional
+- (void)pastedBtnBePressed:(NSString *)centontStr pasteSelectView:(PasteSelectView*)pasteSelectView;
+
+@end
+
+@interface PasteSelectView : UIView
+
+@property (nonatomic,weak)id <PasteSelectViewDelegate> delegate;
+
+- (void)haveCentent:(BOOL)have;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 425 - 0
创维盒子/code/CloudPlayer/View/PasteSelectView.m

@@ -0,0 +1,425 @@
+//
+//  PasteSelectView.m
+//  VclustersGemini
+//
+//  Created by APPLE on 2019/7/5.
+//  Copyright © 2019 APPLE. All rights reserved.
+//
+
+#import "PasteSelectView.h"
+
+#define TAG_PASED_BASE  12345
+
+@interface PasteSelectView ()<UITableViewDelegate,UITableViewDataSource>{
+    NSMutableArray *pasteDataAry;
+    UIView *bgView;
+    UILabel *tipsLabel;
+    UIImageView *noCententImageView;
+    UILabel *noCententLabel;
+    UIButton *clearBtn;
+}
+
+@property (nonatomic, strong, nullable) UITableView *tableView;
+
+@end
+
+@implementation PasteSelectView
+@synthesize delegate;
+
+- (UITableView *)tableView{
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 304.f, SCREEN_H) style:UITableViewStylePlain];
+        _tableView.delegate   = self;
+        _tableView.dataSource = self;
+        _tableView.showsVerticalScrollIndicator = YES;
+        _tableView.showsHorizontalScrollIndicator = NO;
+        [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
+        [_tableView setBackgroundColor:[UIColor clearColor]];
+        [_tableView setTableFooterView:[UIView new]];
+    }
+    
+    return _tableView;
+}
+
+- (id)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    
+    if (self){
+        [self setBackgroundColor:[UIColor clearColor]];
+        
+        [self initData];
+        [self drawView:frame];
+    }
+    
+    return self;
+}
+
+- (void)initData{
+    UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
+    NSString *str = [pasteboard string];
+    HLog(@"__________%s______%@____",__func__,str);
+    
+    if ([str rangeOfString:@"CVLUSTERS_NOUSE_"].location != NSNotFound){
+        str = nil;
+    }
+    
+    NSString* curSn = ksharedAppDelegate.DeviceThirdIdMod.data.changeSn;
+    pasteDataAry = [HWDataManager getObjectWithKey:curSn];
+    
+    if (str){
+        if (pasteDataAry){
+            if (![pasteDataAry containsObject:str]){
+                if ([pasteDataAry count] == 10){
+                    [pasteDataAry removeObjectAtIndex:9];
+                }
+                [pasteDataAry insertObject:str atIndex:0];
+            }
+        }else{
+            pasteDataAry = [[NSMutableArray alloc] init];
+            [pasteDataAry addObject:str];
+        }
+        
+        [HWDataManager setObjectWithKey:curSn value:pasteDataAry];
+    }
+}
+
+- (void)drawView:(CGRect)frame{
+    [self setBackgroundColor:[UIColor clearColor]];
+    CGFloat w_left_right = 57.f;
+//    if (w_left_right > 67.f/2.f)
+//    {
+//        w_left_right = 67.f/2.f;
+//    }
+    
+    if(SCREEN_W > SCREEN_H){
+        w_left_right = SCREEN_W/5.0;
+    }
+    
+    CGFloat h_bg = 272.f;
+    UIImage  *demoPhoneBtnImage = [UIImage imageNamed:@"jianqieban_guanbi_icon"];
+    bgView = [[UIView alloc] init];
+    
+    [bgView setBackgroundColor:RGBACOLOR(0 , 0, 0, 0.6)];
+    [bgView.layer setCornerRadius:20.f];
+    bgView.clipsToBounds = YES;
+    [self addSubview:bgView];
+    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(w_left_right);
+        make.right.mas_equalTo(-w_left_right);
+        make.height.mas_equalTo(h_bg);
+        make.centerY.equalTo(self.mas_centerY).offset(-(demoPhoneBtnImage.size.height + 30.f/2.f)/2.f);
+    }];
+    
+    CGFloat w_left_right_btn = 30.f/2.f;
+    
+    /*删除按钮*/
+    UIButton *demoPhoneBtn = [[UIButton alloc] init];
+    [demoPhoneBtn setBackgroundColor:[UIColor clearColor]];
+    [demoPhoneBtn addTarget:self
+                     action:@selector(removeFromSuperview)
+           forControlEvents:(UIControlEventTouchUpInside)];
+    [demoPhoneBtn setImage:demoPhoneBtnImage forState:(UIControlStateNormal)];
+    [self addSubview:demoPhoneBtn];
+    
+    [demoPhoneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.equalTo(self->bgView.mas_centerX);
+        make.width.mas_equalTo(demoPhoneBtnImage.size.width);
+        make.height.mas_equalTo(demoPhoneBtnImage.size.height);
+        make.top.equalTo(self->bgView.mas_bottom).offset(30.f/2.f);
+    }];
+    
+    /*上方文字*/
+    tipsLabel = [[UILabel alloc] init];
+    [tipsLabel setBackgroundColor:[UIColor clearColor]];
+    [tipsLabel setTextColor:[UIColor whiteColor]];
+    [tipsLabel setFont:[UIFont systemFontOfSize:18.f]];
+    [tipsLabel setTextAlignment:(NSTextAlignmentCenter)];
+    NSInteger numStr = 0;
+    if (pasteDataAry){
+        numStr = [pasteDataAry count];
+    }
+    [tipsLabel setText:@"剪贴板"];
+    
+    [bgView addSubview:tipsLabel];
+    [tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(w_left_right_btn);
+        make.right.mas_equalTo(-w_left_right_btn);
+        make.height.mas_equalTo(21.f);
+        make.top.mas_equalTo(15);
+    }];
+    
+    /*清空按钮*/
+    clearBtn = [[UIButton alloc] init];
+    [clearBtn setBackgroundColor:COLOR_ENABLE_BTN];
+    [clearBtn setTitle:@"清空" forState:(UIControlStateNormal)];
+    [clearBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
+    [clearBtn.titleLabel setFont:[UIFont systemFontOfSize:12.f]];
+    [clearBtn addTarget:self action:@selector(clearPasteInfo) forControlEvents:(UIControlEventTouchUpInside)];
+    [clearBtn.layer setCornerRadius:4];
+    [bgView addSubview:clearBtn];
+    
+    CGFloat w_clearBtn = 36.f;
+    CGFloat h_clearBtn = 19.f;
+    [clearBtn mas_makeConstraints:^(MASConstraintMaker *make){
+        make.right.mas_equalTo(-w_left_right_btn);
+        make.width.mas_equalTo(w_clearBtn);
+         make.height.mas_equalTo(h_clearBtn);
+        make.centerY.equalTo(tipsLabel.mas_centerY);
+    }];
+    
+    noCententImageView = [[UIImageView alloc] init];
+    [noCententImageView setBackgroundColor:[UIColor clearColor]];
+    UIImage *noCententImage = [UIImage imageNamed:@"jianqiebankong_icon"];
+    
+    [bgView addSubview:noCententImageView];
+    [noCententImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.equalTo(self->bgView.mas_centerX);
+        make.width.mas_equalTo(noCententImage.size.width);
+        make.height.mas_equalTo(noCententImage.size.height);
+        make.top.mas_equalTo(40.f);
+    }];
+    [noCententImageView setImage:noCententImage];
+    [noCententImageView setHidden:YES];
+    
+    
+    noCententLabel = [[UILabel alloc] init];
+    [noCententLabel setBackgroundColor:[UIColor clearColor]];
+    [noCententLabel setTextAlignment:(NSTextAlignmentCenter)];
+    [noCententLabel setText:@"剪贴板为空"];
+    [noCententLabel setFont:[UIFont systemFontOfSize:15.f]];
+    [noCententLabel setTextColor:[UIColor whiteColor]];
+    [bgView addSubview:noCententLabel];
+    
+    [noCententLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(20.f);
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.equalTo(noCententImageView.mas_bottom).offset(10.f);
+    }];
+    [noCententLabel setHidden:YES];
+    
+    /*添加列表*/
+    [bgView addSubview:self.tableView];
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(tipsLabel.mas_bottom).offset(10.f);
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(-10);
+        make.bottom.mas_equalTo(-10);
+    }];
+    
+    if (pasteDataAry && [pasteDataAry count] > 0){
+        [self haveCentent:YES];
+        [tipsLabel setHidden:NO];
+    }else{
+        [self haveCentent:NO];
+        [tipsLabel setHidden:YES];
+    }
+}
+
+- (void)clearPasteInfo{
+    [self setHidden:YES];
+    
+    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil
+                                                                             message:@""
+                                                                      preferredStyle:UIAlertControllerStyleAlert];
+    
+    NSString *tipsStr = @"确定清空剪贴板?";
+    NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:tipsStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize: 15], NSForegroundColorAttributeName: HW333333Color}];
+    [alertController setValue:string forKey:@"_attributedMessage"];
+
+    UIView *subView1 = alertController.view.subviews[0];
+    if (subView1 && [subView1 subviews]){
+        UIView *subView2 = subView1.subviews[0];
+        if (subView2 && [subView2 subviews]){
+            UIView *subView3 = subView2.subviews[0];
+            if (subView3 && [subView3 subviews]){
+                UIView *subView4 = subView3.subviews[0];
+                if (subView4 && [subView4 subviews]){
+                    UIView *subView5 = subView4.subviews[0];
+                    if (subView5 && [[subView5 subviews] count] > 1){
+                        UIView *msg = subView5.subviews[1];
+                        if ([msg isKindOfClass:[UILabel class]]){
+                            [(UILabel*)msg setTextAlignment:(NSTextAlignmentCenter)];
+                        }
+                    }
+                }
+            }
+        }
+    }
+    
+       
+    UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [self->pasteDataAry removeAllObjects];
+        UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
+        NSString *str = [pasteboard string];
+        if (str){
+            [pasteboard setString:[@"CVLUSTERS_NOUSE_" stringByAppendingString:str]];
+        }
+        
+        NSString* curSn = ksharedAppDelegate.DeviceThirdIdMod.data.changeSn;
+        [HWDataManager setObjectWithKey:curSn value:self->pasteDataAry];
+        
+        [self.tableView reloadData];
+        [self haveCentent:NO];
+        [self setHidden:NO];
+    }];
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+        [self setHidden:NO];
+    }];
+    
+    [sureAction setValue:HW3370FFColor forKey:@"titleTextColor"];//iOS8.3
+    [alertController addAction:sureAction];
+    [cancelAction setValue:HW333333Color forKey:@"titleTextColor"];//iOS8.3
+    [alertController addAction:cancelAction];
+    
+//    // 弹窗边框
+//    UIView *subview = alertController.view.subviews.firstObject;
+//    UIView *alertContentView = subview.subviews.firstObject;
+//    alertContentView.layer.cornerRadius = 10;
+////    alertContentView.layer.shadowColor = HWFFFFFFColor.CGColor;
+//    alertContentView.layer.shadowOffset = CGSizeMake(0,0);
+//    alertContentView.layer.shadowOpacity = 1;
+//    alertContentView.layer.shadowRadius = 7;
+    // 弹窗背景颜色
+    if (@available(iOS 13.0, *)) {
+        alertController.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
+    }
+    
+    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertController animated:YES completion:nil];
+}
+
+
+- (void)pastedBtnPressed:(NSString*)centontStr{
+    if ([delegate respondsToSelector:@selector(pastedBtnBePressed: pasteSelectView:)]){
+        [delegate pastedBtnBePressed:centontStr pasteSelectView:self];
+    }
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+- (void)haveCentent:(BOOL)have{
+    if (have){
+        [tipsLabel          setHidden:NO];
+        [clearBtn           setHidden:NO];
+        [noCententImageView setHidden:YES];
+        [noCententLabel     setHidden:YES];
+        [self.tableView     setHidden:NO];
+    }else{
+        [tipsLabel          setHidden:NO];
+        [clearBtn           setHidden:YES];
+        [noCententImageView setHidden:NO];
+        [noCententLabel     setHidden:NO];
+        [self.tableView     setHidden:YES];
+    }
+}
+
+#pragma mark - 列表委托
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    if (pasteDataAry){
+        return [pasteDataAry count];
+    }
+    
+    return 0;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    return 1;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    static NSString *identifier = @"UseInfoCell";
+    NSInteger row     = indexPath.section;
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    
+    if (!cell){
+        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
+        [cell setSelectionStyle:UITableViewCellSelectionStyleDefault];
+        [cell setBackgroundColor:[UIColor clearColor]];
+        [cell setAccessoryType:(UITableViewCellAccessoryNone)];
+        
+        UILabel *contentLabel = [[UILabel alloc] init];
+        [contentLabel setBackgroundColor:[UIColor whiteColor]];
+        [contentLabel setTextColor:[UIColor hwColor:@"333333"]];
+        [contentLabel setFont:[UIFont systemFontOfSize:12.f]];
+        [contentLabel setClipsToBounds:YES];
+        [contentLabel setTag:12345];
+        [contentLabel.layer setCornerRadius:3.f];
+        
+        [cell.contentView addSubview:contentLabel];
+        [cell.contentView.layer setCornerRadius:3.f];
+        [cell.contentView setClipsToBounds:YES];
+        
+        [contentLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.height.mas_equalTo(32.f);
+            make.left.mas_equalTo(10.f);
+            make.right.mas_equalTo(-0);
+            make.top.mas_equalTo(0);
+        }];
+    }
+    
+    UILabel *label = [cell.contentView viewWithTag:12345];
+    [label setText:[NSString stringWithFormat:@"  %@",[pasteDataAry objectAtIndex:row]]];
+        
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    NSInteger row     = [indexPath section];
+    [self pastedBtnPressed:[pasteDataAry objectAtIndex:row]];
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 32.f;
+}
+
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+    return YES;
+}
+ 
+// 定义编辑样式
+- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return UITableViewCellEditingStyleDelete;
+}
+ 
+// 进入编辑模式,按下出现的编辑按钮后,进行删除操作
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (editingStyle == UITableViewCellEditingStyleDelete) {
+        [pasteDataAry removeObjectAtIndex:indexPath.section];
+        
+        UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
+        NSString *str = [pasteboard string];
+        if (str){
+            [pasteboard setString:[@"CVLUSTERS_NOUSE_" stringByAppendingString:str]];
+        }
+        
+        NSString* curSn = ksharedAppDelegate.DeviceThirdIdMod.data.changeSn;
+        [HWDataManager setObjectWithKey:curSn value:pasteDataAry];
+        
+        [self.tableView reloadData];
+        if ([pasteDataAry count] == 0){
+            [self haveCentent:NO];
+        }
+    }
+}
+ 
+// 修改编辑按钮文字
+- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return @"删除";
+}
+
+- (UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
+    return [UIView new];
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
+    return 8.f;
+}
+@end

+ 2 - 1
创维盒子/code/webRtc/webRtcManager/webRtcManager.h

@@ -89,7 +89,8 @@ NS_ASSUME_NONNULL_BEGIN
 //获取备份文件夹列表
 - (void)getBackupFolderListFun;
 
-
+#pragma mark 复制手机消息到云机
+- (void)updateCopydata;
 
 #pragma mark 分类方向
 #pragma mark nas下载完成

+ 33 - 7
创维盒子/code/webRtc/webRtcManager/webRtcManager.m

@@ -481,13 +481,39 @@
         str = nil;
     }
     
-    if (str && str.length >0)
-    {
-        //HLog(@"hxd111 cutting  %@",str);
-        /*发送数据*/
-        NSString *dataStr = [RCCommandHelp commandCuttingWithContent:str];
-        [self send_data:dataStr];
-        //pasteboard.string = @"";
+//    if (str && str.length >0)
+//    {
+//        //HLog(@"hxd111 cutting  %@",str);
+//        /*发送数据*/
+//        NSString *dataStr = [RCCommandHelp commandCuttingWithContent:str];
+//        [self send_data:dataStr];
+//        //pasteboard.string = @"";
+//    }
+    
+    NSString* curSn = ksharedAppDelegate.DeviceThirdIdMod.data.changeSn;
+    NSMutableArray *pasteDataAry  = [HWDataManager getObjectWithKey:curSn];
+    
+    if (str){/*当前剪切板中有内容*/
+        if (pasteDataAry){
+            if (![pasteDataAry containsObject:str]){
+                if ([pasteDataAry count] == 10){/*数组长度为10的时候删除最后一个*/
+                    [pasteDataAry removeObjectAtIndex:9];
+                }
+                
+                [pasteDataAry insertObject:str atIndex:0];/*新增内容放到第一位*/
+                /*发送数据到云机*/
+                NSString *dataStr = [RCCommandHelp commandCuttingWithContent:str];
+                [self send_data:dataStr];
+            }
+        }else{/*缓存数组为空 新建数组*/
+            pasteDataAry = [[NSMutableArray alloc] init];
+            [pasteDataAry addObject:str];
+            /*发送数据*/
+            NSString *dataStr = [RCCommandHelp commandCuttingWithContent:str];
+            [self send_data:dataStr];
+        }
+        /*更新后的粘贴数组缓存到本地*/
+        [HWDataManager setObjectWithKey:curSn value:pasteDataAry];;
     }
     
 }

+ 2 - 0
创维盒子/code/webRtc/webRtcPlayerViewController+AppDelegate.m

@@ -32,6 +32,8 @@
         [self relinkWebRtcFunByBecomeActive];
     }
     
+    [[webRtcManager shareManager] updateCopydata];
+    
     [cachesFileManager writeLogsWithMsg:@"applicationDidBecomeActive"];
 }
 

+ 33 - 1
创维盒子/code/webRtc/webRtcPlayerViewController.m

@@ -10,6 +10,7 @@
 #import "webRtcPlayerViewController+AdjustPlayerViewFrame.h"
 #import "webRtcPlayerViewController+AppDelegate.h"
 #import "playerSetView.h"
+#import "PasteSelectView.h"
 
 @interface webRtcPlayerViewController ()<MediaStreamClientEventsDelegate>
 {
@@ -31,6 +32,11 @@
     NSInteger checkLinkTimerNumber;//0 --2 开始发起重连
     NSInteger preDelayedMS;//记录上一次延时数据 控制controlBtn 的图片刷新 非必要 不刷新
     NSInteger  tryRelinkNum;//重连次数
+    
+    /**
+     * @brief 粘贴列表视图
+     */
+    PasteSelectView *pasteSelectView;
 }
 @property (nonatomic, copy)   NSTimer      *playerSecondTimer; // 定时器-控制按钮
 @property (nonatomic, assign) RTCIceConnectionState linkState;
@@ -509,7 +515,7 @@
                 break;
             case 202:
                 {//剪切板
-                   //[weakSelf didClickshortCatFun];
+                   [weakSelf copyInMoreUsageModeBtnBePressed];
                 }
                 break;
             case 203:
@@ -1573,5 +1579,31 @@
     }
 }
 
+/*剪切板 按钮点击*/
+- (void)copyInMoreUsageModeBtnBePressed{
+    mainBlock(^{
+            [self->pasteSelectView removeFromSuperview];
+            self->pasteSelectView = [[PasteSelectView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
+            self->pasteSelectView.delegate = self;
+
+            [[[UIApplication sharedApplication] keyWindow] addSubview:self->pasteSelectView];
+
+            [self->pasteSelectView mas_makeConstraints:^(MASConstraintMaker *make) {
+                make.left.mas_equalTo(0);
+                make.right.mas_equalTo(-0);
+                make.bottom.mas_equalTo(0);
+                make.top.mas_equalTo(0);
+            }];
+
+            CGAffineTransform transform1 = CGAffineTransformMakeScale(0, 0);
+            self->pasteSelectView.layer.affineTransform = transform1;
+            [UIView animateWithDuration:0.5 animations:^{
+                CGAffineTransform transform = CGAffineTransformMakeScale(1, 1);
+                self->pasteSelectView.layer.affineTransform = transform;
+            } ];
+        
+    });
+}
+
 
 @end

+ 12 - 0
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -268,6 +268,10 @@
 		6B2A947A2F0B9E7C00BFC469 /* customSwitchButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2A94772F0B9E7C00BFC469 /* customSwitchButton.h */; };
 		6B2A947B2F0B9E7C00BFC469 /* customSwitchButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2A94772F0B9E7C00BFC469 /* customSwitchButton.h */; };
 		6B2A947C2F0B9E7C00BFC469 /* customSwitchButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B2A94782F0B9E7C00BFC469 /* customSwitchButton.m */; };
+		6B2A947F2F0CF73100BFC469 /* PasteSelectView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2A947D2F0CF73100BFC469 /* PasteSelectView.h */; };
+		6B2A94802F0CF73100BFC469 /* PasteSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B2A947E2F0CF73100BFC469 /* PasteSelectView.m */; };
+		6B2A94812F0CF73100BFC469 /* PasteSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B2A947E2F0CF73100BFC469 /* PasteSelectView.m */; };
+		6B2A94822F0CF73100BFC469 /* PasteSelectView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2A947D2F0CF73100BFC469 /* PasteSelectView.h */; };
 		6B2C1E1C2C070ADE00FDCF82 /* ZFAVPlayerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2C1DCC2C070ADE00FDCF82 /* ZFAVPlayerManager.h */; };
 		6B2C1E1D2C070ADE00FDCF82 /* ZFAVPlayerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2C1DCC2C070ADE00FDCF82 /* ZFAVPlayerManager.h */; };
 		6B2C1E1E2C070ADE00FDCF82 /* ZFAVPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B2C1DCD2C070ADE00FDCF82 /* ZFAVPlayerManager.m */; };
@@ -1812,6 +1816,8 @@
 		6B2A946C2F0B5E8C00BFC469 /* KeychainHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeychainHelper.m; sourceTree = "<group>"; };
 		6B2A94772F0B9E7C00BFC469 /* customSwitchButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = customSwitchButton.h; sourceTree = "<group>"; };
 		6B2A94782F0B9E7C00BFC469 /* customSwitchButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = customSwitchButton.m; sourceTree = "<group>"; };
+		6B2A947D2F0CF73100BFC469 /* PasteSelectView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PasteSelectView.h; sourceTree = "<group>"; };
+		6B2A947E2F0CF73100BFC469 /* PasteSelectView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PasteSelectView.m; sourceTree = "<group>"; };
 		6B2C1DCC2C070ADE00FDCF82 /* ZFAVPlayerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFAVPlayerManager.h; sourceTree = "<group>"; };
 		6B2C1DCD2C070ADE00FDCF82 /* ZFAVPlayerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFAVPlayerManager.m; sourceTree = "<group>"; };
 		6B2C1DCF2C070ADE00FDCF82 /* UIImageView+ZFCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+ZFCache.h"; sourceTree = "<group>"; };
@@ -2765,6 +2771,8 @@
 				6B6D42F02C295BCD006CAE3A /* playerSetView.m */,
 				6B2A94772F0B9E7C00BFC469 /* customSwitchButton.h */,
 				6B2A94782F0B9E7C00BFC469 /* customSwitchButton.m */,
+				6B2A947D2F0CF73100BFC469 /* PasteSelectView.h */,
+				6B2A947E2F0CF73100BFC469 /* PasteSelectView.m */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -4308,6 +4316,7 @@
 				6BFF26952AF9D8CC00FCB4F7 /* AuthCodeInputView.h in Headers */,
 				6B1CC2C62B677F3E00AD4217 /* extraMediaEventModel.h in Headers */,
 				6B42C1572C2A6C2700936268 /* SYJUISwitch.h in Headers */,
+				6B2A947F2F0CF73100BFC469 /* PasteSelectView.h in Headers */,
 				6B5B607A2B3E71B6009A2AE2 /* filePathCreatTableViewCell.h in Headers */,
 				18FCE5442AD136FF0020F623 /* ShortcutManager.h in Headers */,
 				6B2170A02B15D39900656670 /* privacyModeTipViewController.h in Headers */,
@@ -4622,6 +4631,7 @@
 				6BD506C22B9576A4006E7CB0 /* AuthCodeInputView.h in Headers */,
 				6BD506C32B9576A4006E7CB0 /* extraMediaEventModel.h in Headers */,
 				6B42C1582C2A6C2700936268 /* SYJUISwitch.h in Headers */,
+				6B2A94822F0CF73100BFC469 /* PasteSelectView.h in Headers */,
 				6BD506C42B9576A4006E7CB0 /* filePathCreatTableViewCell.h in Headers */,
 				6BD506C52B9576A4006E7CB0 /* ShortcutManager.h in Headers */,
 				6BD506C62B9576A4006E7CB0 /* privacyModeTipViewController.h in Headers */,
@@ -5153,6 +5163,7 @@
 				6B2A94792F0B9E7C00BFC469 /* customSwitchButton.m in Sources */,
 				6BB5731E2C7D6E1D00713351 /* scanToPCLoginViewController.m in Sources */,
 				6B2C1E7F2C070ADE00FDCF82 /* ZFOrientationObserver.m in Sources */,
+				6B2A94812F0CF73100BFC469 /* PasteSelectView.m in Sources */,
 				6B42A2202C41040B000555BB /* UIInterface+HXRotation.m in Sources */,
 				6BD507302B9576A4006E7CB0 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
 				6B5394A22C81A99200195AA4 /* nasMixBackupsManager.m in Sources */,
@@ -5549,6 +5560,7 @@
 				6B2A947C2F0B9E7C00BFC469 /* customSwitchButton.m in Sources */,
 				6BB5731C2C7D6E1D00713351 /* scanToPCLoginViewController.m in Sources */,
 				6B2C1E7E2C070ADE00FDCF82 /* ZFOrientationObserver.m in Sources */,
+				6B2A94802F0CF73100BFC469 /* PasteSelectView.m in Sources */,
 				6B42A21F2C41040B000555BB /* UIInterface+HXRotation.m in Sources */,
 				183AE6512A8A2CF000B11CB0 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
 				6B53949F2C81A99200195AA4 /* nasMixBackupsManager.m in Sources */,