Explorar el Código

1.云机设置页面完成,功能部分完成

huangxiaodong hace 1 año
padre
commit
00ca87046d
Se han modificado 23 ficheros con 881 adiciones y 55 borrados
  1. 32 0
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 4 4
      创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch
  3. 22 0
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_exit.imageset/Contents.json
  4. BIN
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_exit.imageset/cloudPhone_set_exit@2x.png
  5. BIN
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_exit.imageset/cloudPhone_set_exit@3x.png
  6. 22 0
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_restart.imageset/Contents.json
  7. BIN
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_restart.imageset/cloudPhone_set_restart@2x.png
  8. BIN
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_restart.imageset/cloudPhone_set_restart@3x.png
  9. 22 0
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_screenshot.imageset/Contents.json
  10. BIN
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_screenshot.imageset/cloudPhone_set_screenshot@2x.png
  11. BIN
      创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_screenshot.imageset/cloudPhone_set_screenshot@3x.png
  12. 2 1
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.h
  13. 43 3
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm
  14. 2 0
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController.h
  15. 101 44
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm
  16. 16 0
      创维盒子/双子星云手机/CloudPlayer/View/playerSetView.h
  17. 257 0
      创维盒子/双子星云手机/CloudPlayer/View/playerSetView.m
  18. 33 0
      创维盒子/双子星云手机/Vendor/SYJUISwitch/SYJUISwitch.h
  19. 306 0
      创维盒子/双子星云手机/Vendor/SYJUISwitch/SYJUISwitch.m
  20. 3 0
      创维盒子/双子星云手机/cloudPhone/websocket/webSocketManager.h
  21. 6 0
      创维盒子/双子星云手机/cloudPhone/websocket/webSocketManager.m
  22. 3 1
      创维盒子/双子星云手机/mine/mineViewController.m
  23. 7 2
      创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

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

@@ -403,6 +403,10 @@
 		6B41C3532C09E55700DFDADC /* PlayerViewController+downloadNasFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B41C3512C09E55600DFDADC /* PlayerViewController+downloadNasFile.m */; };
 		6B41C3542C09E55700DFDADC /* PlayerViewController+downloadNasFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B41C3512C09E55600DFDADC /* PlayerViewController+downloadNasFile.m */; };
 		6B41C3552C09E55700DFDADC /* PlayerViewController+downloadNasFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B41C3502C09E55600DFDADC /* PlayerViewController+downloadNasFile.h */; };
+		6B42C1572C2A6C2700936268 /* SYJUISwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B42C1542C2A6C2600936268 /* SYJUISwitch.h */; };
+		6B42C1582C2A6C2700936268 /* SYJUISwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B42C1542C2A6C2600936268 /* SYJUISwitch.h */; };
+		6B42C1592C2A6C2700936268 /* SYJUISwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B42C1552C2A6C2600936268 /* SYJUISwitch.m */; };
+		6B42C15A2C2A6C2700936268 /* SYJUISwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B42C1552C2A6C2600936268 /* SYJUISwitch.m */; };
 		6B45C4FD2B57BC87007E6911 /* cloudPhoneExtraFileListModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B45C4FB2B57BC87007E6911 /* cloudPhoneExtraFileListModel.h */; };
 		6B45C4FE2B57BC87007E6911 /* cloudPhoneExtraFileListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B45C4FC2B57BC87007E6911 /* cloudPhoneExtraFileListModel.m */; };
 		6B45C5042B5F9CEC007E6911 /* diskListTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B45C5022B5F9CEC007E6911 /* diskListTableView.h */; };
@@ -576,6 +580,10 @@
 		6B6D42EC2C290A06006CAE3A /* cloudPhoneSetView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6D42E92C290A06006CAE3A /* cloudPhoneSetView.h */; };
 		6B6D42ED2C290A06006CAE3A /* cloudPhoneSetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6D42EA2C290A06006CAE3A /* cloudPhoneSetView.m */; };
 		6B6D42EE2C290A06006CAE3A /* cloudPhoneSetView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6D42E92C290A06006CAE3A /* cloudPhoneSetView.h */; };
+		6B6D42F12C295BCD006CAE3A /* playerSetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6D42F02C295BCD006CAE3A /* playerSetView.m */; };
+		6B6D42F22C295BCD006CAE3A /* playerSetView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6D42EF2C295BCD006CAE3A /* playerSetView.h */; };
+		6B6D42F32C295BCD006CAE3A /* playerSetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6D42F02C295BCD006CAE3A /* playerSetView.m */; };
+		6B6D42F42C295BCD006CAE3A /* playerSetView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6D42EF2C295BCD006CAE3A /* playerSetView.h */; };
 		6B72724B2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7272492B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h */; };
 		6B72724C2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B72724A2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m */; };
 		6B72724F2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B72724D2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h */; };
@@ -1549,6 +1557,8 @@
 		6B3F96392AD2AD0B008E349E /* newWorkInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = newWorkInterface.h; sourceTree = "<group>"; };
 		6B41C3502C09E55600DFDADC /* PlayerViewController+downloadNasFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlayerViewController+downloadNasFile.h"; sourceTree = "<group>"; };
 		6B41C3512C09E55600DFDADC /* PlayerViewController+downloadNasFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PlayerViewController+downloadNasFile.m"; sourceTree = "<group>"; };
+		6B42C1542C2A6C2600936268 /* SYJUISwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SYJUISwitch.h; sourceTree = "<group>"; };
+		6B42C1552C2A6C2600936268 /* SYJUISwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SYJUISwitch.m; sourceTree = "<group>"; };
 		6B45C4FB2B57BC87007E6911 /* cloudPhoneExtraFileListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cloudPhoneExtraFileListModel.h; sourceTree = "<group>"; };
 		6B45C4FC2B57BC87007E6911 /* cloudPhoneExtraFileListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = cloudPhoneExtraFileListModel.m; sourceTree = "<group>"; };
 		6B45C5022B5F9CEC007E6911 /* diskListTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = diskListTableView.h; sourceTree = "<group>"; };
@@ -1658,6 +1668,8 @@
 		6B6ABEF12BFF6B4C00480BAC /* boxSaveFileManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = boxSaveFileManager.m; sourceTree = "<group>"; };
 		6B6D42E92C290A06006CAE3A /* cloudPhoneSetView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cloudPhoneSetView.h; sourceTree = "<group>"; };
 		6B6D42EA2C290A06006CAE3A /* cloudPhoneSetView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = cloudPhoneSetView.m; sourceTree = "<group>"; };
+		6B6D42EF2C295BCD006CAE3A /* playerSetView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = playerSetView.h; sourceTree = "<group>"; };
+		6B6D42F02C295BCD006CAE3A /* playerSetView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = playerSetView.m; sourceTree = "<group>"; };
 		6B7272492B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordTableViewHeadView.h; sourceTree = "<group>"; };
 		6B72724A2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordTableViewHeadView.m; sourceTree = "<group>"; };
 		6B72724D2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordEditBottomView.h; sourceTree = "<group>"; };
@@ -2280,6 +2292,8 @@
 				6B4D23B02B33DDBB005B718A /* imageVersionRenewTipView.m */,
 				6B1CC2C82B67A5FC00AD4217 /* USBInsertPopView.h */,
 				6B1CC2C92B67A5FC00AD4217 /* USBInsertPopView.m */,
+				6B6D42EF2C295BCD006CAE3A /* playerSetView.h */,
+				6B6D42F02C295BCD006CAE3A /* playerSetView.m */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -2694,6 +2708,15 @@
 			path = netWork;
 			sourceTree = "<group>";
 		};
+		6B42C1562C2A6C2600936268 /* SYJUISwitch */ = {
+			isa = PBXGroup;
+			children = (
+				6B42C1542C2A6C2600936268 /* SYJUISwitch.h */,
+				6B42C1552C2A6C2600936268 /* SYJUISwitch.m */,
+			);
+			path = SYJUISwitch;
+			sourceTree = "<group>";
+		};
 		6B467BAF2BC7E3B10039A6A6 /* addLog */ = {
 			isa = PBXGroup;
 			children = (
@@ -3102,6 +3125,7 @@
 		A003F6B727D841FF00715CBF /* Vendor */ = {
 			isa = PBXGroup;
 			children = (
+				6B42C1562C2A6C2600936268 /* SYJUISwitch */,
 				6B2C1E1B2C070ADE00FDCF82 /* ZFPlayer */,
 				6B4C0F5D2C0314BA0070EF2E /* DFPlayer */,
 				6BA08F462C01D05B00A2242D /* UploadManager */,
@@ -3449,6 +3473,7 @@
 				6B45C4FD2B57BC87007E6911 /* cloudPhoneExtraFileListModel.h in Headers */,
 				6B2C1E642C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS15.h in Headers */,
 				6BFF26912AF9D88200FCB4F7 /* AuthCodeTextField.h in Headers */,
+				6B6D42F22C295BCD006CAE3A /* playerSetView.h in Headers */,
 				184C8ADA2A949DAC00F26650 /* HaveNewVersionView.h in Headers */,
 				6BBB35DD2AE76AD800E4A59B /* AudioSessionObject.h in Headers */,
 				6B2C1EA02C070ADE00FDCF82 /* ZFPortraitViewController.h in Headers */,
@@ -3509,6 +3534,7 @@
 				6B7EA7A42BF607FB002D5CC2 /* imageDetailsScrollViewController.h in Headers */,
 				6BFF26952AF9D8CC00FCB4F7 /* AuthCodeInputView.h in Headers */,
 				6B1CC2C62B677F3E00AD4217 /* extraMediaEventModel.h in Headers */,
+				6B42C1572C2A6C2700936268 /* SYJUISwitch.h in Headers */,
 				6B5B607A2B3E71B6009A2AE2 /* filePathCreatTableViewCell.h in Headers */,
 				18FCE5442AD136FF0020F623 /* ShortcutManager.h in Headers */,
 				6B2170A02B15D39900656670 /* privacyModeTipViewController.h in Headers */,
@@ -3682,6 +3708,7 @@
 				6BD506A02B9576A4006E7CB0 /* cloudPhoneExtraFileListModel.h in Headers */,
 				6B2C1E652C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS15.h in Headers */,
 				6BD506A12B9576A4006E7CB0 /* AuthCodeTextField.h in Headers */,
+				6B6D42F42C295BCD006CAE3A /* playerSetView.h in Headers */,
 				6BD506A32B9576A4006E7CB0 /* HaveNewVersionView.h in Headers */,
 				6BD506A42B9576A4006E7CB0 /* AudioSessionObject.h in Headers */,
 				6B2C1EA12C070ADE00FDCF82 /* ZFPortraitViewController.h in Headers */,
@@ -3742,6 +3769,7 @@
 				6B7EA7A62BF607FB002D5CC2 /* imageDetailsScrollViewController.h in Headers */,
 				6BD506C22B9576A4006E7CB0 /* AuthCodeInputView.h in Headers */,
 				6BD506C32B9576A4006E7CB0 /* extraMediaEventModel.h in Headers */,
+				6B42C1582C2A6C2700936268 /* SYJUISwitch.h in Headers */,
 				6BD506C42B9576A4006E7CB0 /* filePathCreatTableViewCell.h in Headers */,
 				6BD506C52B9576A4006E7CB0 /* ShortcutManager.h in Headers */,
 				6BD506C62B9576A4006E7CB0 /* privacyModeTipViewController.h in Headers */,
@@ -4413,6 +4441,7 @@
 				6BD507652B9576A4006E7CB0 /* HWHomeListCell.m in Sources */,
 				6BD507662B9576A4006E7CB0 /* JSONKeyMapper.m in Sources */,
 				6BD507672B9576A4006E7CB0 /* SimplePing.m in Sources */,
+				6B6D42F32C295BCD006CAE3A /* playerSetView.m in Sources */,
 				6BD507682B9576A4006E7CB0 /* FMResultSet.m in Sources */,
 				6B34DC6E2BF2070D002DD1EF /* titleLabelReusableView.m in Sources */,
 				6B6D42ED2C290A06006CAE3A /* cloudPhoneSetView.m in Sources */,
@@ -4440,6 +4469,7 @@
 				6BD507772B9576A4006E7CB0 /* forgetSecretKeyViewController.m in Sources */,
 				6BD507782B9576A4006E7CB0 /* UITextfield+NLLimit.m in Sources */,
 				6BD507792B9576A4006E7CB0 /* ShowImageView.m in Sources */,
+				6B42C15A2C2A6C2700936268 /* SYJUISwitch.m in Sources */,
 				6B7EA7B92BF74BDB002D5CC2 /* shareBySecretView.m in Sources */,
 				6BD5077A2B9576A4006E7CB0 /* SetPWDFirstViewController.m in Sources */,
 				6BD5077B2B9576A4006E7CB0 /* HWSearchBar.m in Sources */,
@@ -4728,6 +4758,7 @@
 				A084D69827E8657800054880 /* HWHomeListCell.m in Sources */,
 				183AE6032A89CE3C00B11CB0 /* JSONKeyMapper.m in Sources */,
 				6BF52C9B2AD5546500A617DB /* SimplePing.m in Sources */,
+				6B6D42F12C295BCD006CAE3A /* playerSetView.m in Sources */,
 				A08A950427E9A4E400C544BB /* FMResultSet.m in Sources */,
 				6B34DC6C2BF2070D002DD1EF /* titleLabelReusableView.m in Sources */,
 				6B6D42EB2C290A06006CAE3A /* cloudPhoneSetView.m in Sources */,
@@ -4755,6 +4786,7 @@
 				6BFF269A2AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m in Sources */,
 				18E5572F2A3C6141005CC84B /* UITextfield+NLLimit.m in Sources */,
 				183AE6B72A8CA0C100B11CB0 /* ShowImageView.m in Sources */,
+				6B42C1592C2A6C2700936268 /* SYJUISwitch.m in Sources */,
 				6B7EA7B72BF74BDB002D5CC2 /* shareBySecretView.m in Sources */,
 				186820262AB9B5BF005702A6 /* SetPWDFirstViewController.m in Sources */,
 				A003F6F827D8775A00715CBF /* HWSearchBar.m in Sources */,

+ 4 - 4
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -90,12 +90,12 @@ isBangsScreen; \
 //#define CloudService           @"http://14.18.190.141:11180"
 //#define CloudService           @"http://14.18.190.141:1280"
 //创维盒子 测试地址
-#define CloudService   @"http://14.18.190.141:1801"
-#define shareService   @"http://testprivacy.phone.armclouding.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
+//#define CloudService   @"http://14.18.190.141:1801"
+//#define shareService   @"http://testprivacy.phone.armclouding.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 //生产环境
-//#define CloudService   @"http://hiboxde.armclouding.com:7780"
-//#define shareService   @"http://hiboxde.armclouding.com:7780/h5/#/pages/fileSharing/index?productType=Private-X&token="
+#define CloudService   @"http://hiboxde.armclouding.com:7780"
+#define shareService   @"http://hiboxde.armclouding.com:7780/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 #define AESCODEKEEYY @"fvO8gAfNSr1tbdQe"
 

+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_exit.imageset/Contents.json

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

BIN
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_exit.imageset/cloudPhone_set_exit@2x.png


BIN
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_exit.imageset/cloudPhone_set_exit@3x.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_restart.imageset/Contents.json

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

BIN
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_restart.imageset/cloudPhone_set_restart@2x.png


BIN
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_restart.imageset/cloudPhone_set_restart@3x.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_screenshot.imageset/Contents.json

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

BIN
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_screenshot.imageset/cloudPhone_set_screenshot@2x.png


BIN
创维盒子/双子星云手机/Assets.xcassets/cloudPhone/cloudPhone_set_screenshot.imageset/cloudPhone_set_screenshot@3x.png


+ 2 - 1
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.h

@@ -25,7 +25,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 - (void)checkAllTaskFun;
-
+#pragma mark 保存截图到相册
+- (void)screenShotToPhoneFun;
 - (void)saveLastImageFun;
 - (void)readLastImageFun;
 

+ 43 - 3
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm

@@ -171,6 +171,41 @@
     [self.view bringSubviewToFront:RenewTipView];
 }
 
+#pragma mark 保存截图到相册
+- (void)screenShotToPhoneFun
+{
+    [[webSocketManager shareInstance] screenshotInCloudPhoneFun];
+    
+//    CIImage *processedImage = saveCIImage;
+//    CIContext *context = [CIContext contextWithOptions:nil];
+//    CGImageRef cgiimage = [context createCGImage:processedImage fromRect:processedImage.extent];
+//    UIImage *image = [UIImage imageWithCGImage:cgiimage];
+//    CGImageRelease(cgiimage);
+//    
+//    if(!image){
+//        self->needScreenShotType = YES;
+//        return;
+//    }
+//    
+//    [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
+//         //写入图片到相册
+//         PHAssetChangeRequest *req = [PHAssetChangeRequest creationRequestForAssetFromImage:image];
+//            
+//     } completionHandler:^(BOOL success, NSError * _Nullable error) {
+//         //NSLog(@"success = %d, error = %@", success, error);
+//         if (success) {
+//             HLog(@"已将截图图片保存至相册");
+//             
+//             mainBlock(^{
+//                 [[iToast makeText:@""] show];
+//             });
+//             
+//         } else {
+//             self->needScreenShotType = YES;
+//             HLog(@"未能将截图图片保存至相册");
+//         }
+//     }];
+}
 
 - (void)saveLastImageFun
 {
@@ -178,10 +213,15 @@
         return;
     }
     
-    UIImage *image = [UIImage imageWithCIImage:saveCIImage];
+    //UIImage *image = [UIImage imageWithCIImage:saveCIImage];
+    
+    CIImage *processedImage = saveCIImage;
+    CIContext *context = [CIContext contextWithOptions:nil];
+    CGImageRef cgiimage = [context createCGImage:processedImage fromRect:processedImage.extent];
+    UIImage *image = [UIImage imageWithCGImage:cgiimage];
+    CGImageRelease(cgiimage);
+    
     if(image){   //执行返回最后一帧
-        //[mPlayerView.showImageView setImage:image];
-        
         NSString *filePath = kSHPath_cloudPhone_last_image;
         NSString *folderPath = [kSHPath_cloudPhone_last_image stringByDeletingLastPathComponent];
         [[NSFileManager defaultManager] removeItemAtPath:folderPath error:nil];

+ 2 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.h

@@ -70,6 +70,8 @@
     
     //下载nas相关
     YCDownloadItem *curYCDownloadItem;
+    
+    BOOL needScreenShotType;/*标记需要做一次截屏*/
 }
 
 @property(copy,nonatomic)NSString * _Nullable internetVideoPort;

+ 101 - 44
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -40,6 +40,7 @@
 #import "PhoneTimeInfoModel.h"
 #import "connectDeviceManager.h"
 #import "commandSendCheckModel.h"
+#import "playerSetView.h"
 
 typedef enum : NSUInteger {
     BITRATE_EXTREME_SPEED = 2,//极速
@@ -728,6 +729,11 @@ UIDocumentPickerDelegate>
                 [mySelf saveLastImageFun];
             }
             
+            if(self->needScreenShotType){
+                self->needScreenShotType = NO;
+                [self screenShotToPhoneFun];
+            }
+            
             //尝试修复闪一下 没解决
 //            if(ciImage){
 //
@@ -1246,59 +1252,110 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     HLog(@"云手机推流界面 控制按钮点击手势结束");
     [[NSNotificationCenter defaultCenter] postNotificationName:PlayerViewControlBtnTouchEndNotification object:nil userInfo:nil];
     
-    HLog(@"__________%s__________",__func__);
-    [[UIApplication sharedApplication] setStatusBarHidden:NO];
-    MySetViewController *nextVC = [[MySetViewController alloc] init];
-    //nextVC.whetherPhoneStatus = phoneTimeInfoDataModel.data.whetherPhoneStatus;
-    [self.navigationController pushViewController:nextVC animated:YES];
-    self.isNeedRecyclResource = NO;
+
+//    [[UIApplication sharedApplication] setStatusBarHidden:NO];
+//    MySetViewController *nextVC = [[MySetViewController alloc] init];
+//    //nextVC.whetherPhoneStatus = phoneTimeInfoDataModel.data.whetherPhoneStatus;
+//    [self.navigationController pushViewController:nextVC animated:YES];
+//    self.isNeedRecyclResource = NO;
     
-    KWeakSelf
-#pragma mark 重启盒子
-    //{"type":"reboot"}
-    nextVC.needToReboot = ^{
-        [weakSelf needToRebootFun];
-    };
+    playerSetView *nextVC = [[playerSetView alloc] init];
+    [ksharedAppDelegate.window addSubview:nextVC];
+    //[self.view insertSubview:nextVC atIndex:0];
     
-#pragma mark TV投屏
-    nextVC.needToTVP2P = ^{
-        NSString *commondStr  = @"{\"type\":\"wakeupTV\"}";
-        [weakSelf send_data:commondStr];
-    };
-#pragma mark 关闭TV投屏
-    nextVC.closeTVP2P = ^{
-        NSString *commondStr  = @"{\"type\":\"TvOff\"}";
-        [weakSelf send_data:commondStr];
-    };
-    
-#pragma mark 恢复出厂盒子
-    nextVC.needToReset = ^{
-        [weakSelf needToResetFun];
-    };
+    [nextVC mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(0.f);
+        make.bottom.mas_equalTo(0.f);
+    }];
     
-#pragma mark 恢复出厂盒子 ok
-        nextVC.needToResetAndOk = ^{
-            [weakSelf tryAgainInLinkFailFun];
-            [weakSelf startCheckThridRuiYunTimerFun];
-        };
-        
+    KWeakSelf
     
-#pragma mark 获取云机版本信息
-    nextVC.getSysInfo = ^{
-        NSString *commondStr  = @"{\"type\":\"getSysInfo\"}";
-        [weakSelf send_data:commondStr];
+    nextVC.didClickButtonFun = ^(NSInteger tag) {
+        switch (tag) {
+            case 10:
+                {//截图
+                   self->needScreenShotType = YES;
+                }
+                break;
+#pragma mark 重启盒子
+            case 11:
+                {
+                    [weakSelf needToRebootFun];
+                }
+                break;
+            case 12:
+                {//退出云机
+                    [weakSelf exitCloudPhoneFun];
+                }
+                break;
+            case 100:
+                {
+                    NSString *commondStr  = @"{\"type\":\"wakeupTV\"}";
+                    [weakSelf send_data:commondStr];
+                }
+                break;
+            case 101:
+                {
+                    NSString *commondStr  = @"{\"type\":\"TvOff\"}";
+                    [weakSelf send_data:commondStr];
+                }
+                break;
+            default:
+                break;
+        }
     };
     
-#pragma mark 获取TV投屏状态
-    nextVC.getTvStatus = ^{
-        NSString *commondStr  = @"{\"type\":\"TvStatus\"}";
-        [weakSelf send_data:commondStr];
-    };
+//#pragma mark 重启盒子
+//    //{"type":"reboot"}
+//    nextVC.needToReboot = ^{
+//        [weakSelf needToRebootFun];
+//    };
+//    
+//#pragma mark TV投屏
+//    nextVC.needToTVP2P = ^{
+//        NSString *commondStr  = @"{\"type\":\"wakeupTV\"}";
+//        [weakSelf send_data:commondStr];
+//    };
+//#pragma mark 关闭TV投屏
+//    nextVC.closeTVP2P = ^{
+//        NSString *commondStr  = @"{\"type\":\"TvOff\"}";
+//        [weakSelf send_data:commondStr];
+//    };
+//    
+//#pragma mark 恢复出厂盒子
+//    nextVC.needToReset = ^{
+//        [weakSelf needToResetFun];
+//    };
+//    
+//#pragma mark 恢复出厂盒子 ok
+//        nextVC.needToResetAndOk = ^{
+//            [weakSelf tryAgainInLinkFailFun];
+//            [weakSelf startCheckThridRuiYunTimerFun];
+//        };
+//        
+    
+//#pragma mark 获取云机版本信息
+//    nextVC.getSysInfo = ^{
+//        NSString *commondStr  = @"{\"type\":\"getSysInfo\"}";
+//        [weakSelf send_data:commondStr];
+//    };
+    
+//#pragma mark 获取TV投屏状态
+//    nextVC.getTvStatus = ^{
+//        NSString *commondStr  = @"{\"type\":\"TvStatus\"}";
+//        [weakSelf send_data:commondStr];
+//    };
+}
+
+#pragma mark 退出云机
+- (void)exitCloudPhoneFun
+{
+    [self.navigationController popViewControllerAnimated:YES];
 }
 
 
-
-
 - (void)needToRebootFun
 {
     NSString *commondStr  = @"{\"type\":\"reboot\"}";

+ 16 - 0
创维盒子/双子星云手机/CloudPlayer/View/playerSetView.h

@@ -0,0 +1,16 @@
+//
+//  playerSetView.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/24.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface playerSetView : UIView
+@property (nonatomic,copy) void (^didClickButtonFun)(NSInteger tag);
+@end
+
+NS_ASSUME_NONNULL_END

+ 257 - 0
创维盒子/双子星云手机/CloudPlayer/View/playerSetView.m

@@ -0,0 +1,257 @@
+//
+//  playerSetView.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/24.
+//
+
+#import "playerSetView.h"
+#import "SYJUISwitch.h"
+
+@interface playerSetView ()
+@property(nonatomic, strong) SYJUISwitch * bottomNavSwitch;//底部导航栏开关
+@property(nonatomic, strong) SYJUISwitch * fullScreenSwitch;//全面屏开关
+@end
+
+@implementation playerSetView
+
+- (id)initWithFrame:(CGRect)frame{
+   self = [super initWithFrame:frame];
+   self.backgroundColor = [UIColor hwColor:@"000000" alpha:0.6];
+   [self drawAnyView];
+   
+   return self;
+}
+
+- (void)drawAnyView{
+    
+    //扩大金融云机范围按钮
+    UIButton *bigButton = [[UIButton alloc] init];
+    bigButton.tag = 1;
+    [bigButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [self addSubview:bigButton];
+    //bigButton.backgroundColor = [UIColor greenColor];
+    
+    [bigButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.left.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    UIView* blackBgView = [UIView new];
+    blackBgView.layer.cornerRadius = 20;
+    blackBgView.backgroundColor = [UIColor hwColor:@"#202630"];
+    [self addSubview:blackBgView];
+    
+    [blackBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(256);
+        make.width.mas_equalTo(245);
+        make.centerX.mas_equalTo(0.f);
+        make.centerY.mas_equalTo(00.f);
+    }];
+    
+    UIView *bg1View = [UIView new];
+    bg1View.layer.cornerRadius = 12;
+    bg1View.backgroundColor = [UIColor hwColor:@"#29313D"];
+    [blackBgView addSubview:bg1View];
+    
+    [bg1View mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(74);
+        make.left.mas_equalTo(12);
+        make.right.mas_equalTo(-12);
+        make.top.mas_equalTo(16.f);
+    }];
+    
+    //底部导航栏开关
+    _bottomNavSwitch = [[SYJUISwitch alloc] initWithFrame:CGRectMake(0, 0, 44, 22)];
+    _bottomNavSwitch.onTintColor = HW13B2EBColor;
+    _bottomNavSwitch.offTintColor = [UIColor hwColor:@"#E3E8F1"];
+    [_bottomNavSwitch addTarget:self action:@selector(maskSwitchPressed:) forControlEvents:UIControlEventValueChanged];
+    [bg1View addSubview:_bottomNavSwitch];
+    [_bottomNavSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(35.f);
+        make.top.mas_equalTo(16.f);
+        make.width.mas_equalTo(44.f);
+        make.height.mas_equalTo(22.f);
+    }];
+    
+//    BOOL haveOpenMask = [HWDataManager getBoolWithKey:Consn_Fanzhuan_Exit_app_Open];
+//    [_bottomNavSwitch setOn:haveOpenMask];
+    
+    UILabel *navSwitchTipLabel = [[UILabel alloc] init];
+    navSwitchTipLabel.text = NSLocalizedString(@"cloudPhone_nav_show_tip",nil);
+    navSwitchTipLabel.textAlignment = NSTextAlignmentCenter;
+    navSwitchTipLabel.textColor = [UIColor whiteColor];
+    navSwitchTipLabel.font = [UIFont systemFontOfSize:10.0];
+    [bg1View addSubview:navSwitchTipLabel];
+    
+    [navSwitchTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.equalTo(bg1View.mas_centerX).offset(-10.f);
+        make.left.mas_equalTo(10);
+        make.top.equalTo(_bottomNavSwitch.mas_bottom).offset(6);
+    }];
+    
+    //全面屏开关
+    _fullScreenSwitch = [[SYJUISwitch alloc] initWithFrame:CGRectMake(0, 0, 44, 22)];
+    _fullScreenSwitch.onTintColor = HW13B2EBColor;
+    _fullScreenSwitch.offTintColor = [UIColor hwColor:@"#E3E8F1"];
+    [_fullScreenSwitch addTarget:self action:@selector(maskSwitchPressed:) forControlEvents:UIControlEventValueChanged];
+    [bg1View addSubview:_fullScreenSwitch];
+    [_fullScreenSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-35.f);
+        make.top.mas_equalTo(16.f);
+        make.width.mas_equalTo(44.f);
+        make.height.mas_equalTo(22.f);
+    }];
+    
+//    BOOL haveOpenMask = [HWDataManager getBoolWithKey:Consn_Fanzhuan_Exit_app_Open];
+//    [_bottomNavSwitch setOn:haveOpenMask];
+    
+    UILabel *fullScreenTipLabel = [[UILabel alloc] init];
+    fullScreenTipLabel.text = NSLocalizedString(@"cloudPhone_fullScreen_show_tip",nil);
+    fullScreenTipLabel.textAlignment = NSTextAlignmentCenter;
+    fullScreenTipLabel.textColor = [UIColor whiteColor];
+    fullScreenTipLabel.font = [UIFont systemFontOfSize:10.0];
+    [bg1View addSubview:fullScreenTipLabel];
+    
+    [fullScreenTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(bg1View.mas_centerX).offset(10.f);
+        make.right.mas_equalTo(-10);
+        make.top.equalTo(_bottomNavSwitch.mas_bottom).offset(6);
+    }];
+    
+    
+    
+    /**********************************************************************************/
+    UIView *bg2View = [UIView new];
+    bg2View.layer.cornerRadius = 12;
+    bg2View.backgroundColor = [UIColor hwColor:@"#29313D"];
+    [blackBgView addSubview:bg2View];
+    
+    [bg2View mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(74);
+        make.left.mas_equalTo(12);
+        make.right.mas_equalTo(-12);
+        make.top.equalTo(bg1View.mas_bottom).offset(12);
+    }];
+    
+    
+    NSArray *titleArr = @[NSLocalizedString(@"cloudPhone_set_screenshot_tip",nil),
+                          NSLocalizedString(@"my_set_no_restart_phone",nil),
+                          NSLocalizedString(@"cloudPhone_set_exit_tip",nil),
+    ];
+    
+    NSArray *imageArr = @[@"cloudPhone_set_screenshot",
+                          @"cloudPhone_set_restart",
+                          @"cloudPhone_set_exit",
+    ];
+    
+    CGFloat butTopY = 15.0;
+    CGFloat imageWH = 24.0;
+    
+    CGFloat butHeight = imageWH +20 +5;
+    CGFloat butWidth = (245 -12*2)/3.0;  //70.0;
+    CGFloat butSpace = 0.0; //(245  - butWidth*3)/3.0;
+    
+    for (int i=0; i<titleArr.count; i++) {
+        
+        UIButton *but = [[UIButton alloc] init];
+        but.tag = 10+i;
+        [but addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+        [bg2View addSubview:but];
+        //but.backgroundColor = [UIColor greenColor];
+        
+        [but mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(butSpace + (butWidth+butSpace)*(i%4));
+            make.width.mas_equalTo(butWidth);
+            make.height.mas_equalTo(butHeight);
+            make.top.mas_equalTo(butTopY + (i/4)* (butHeight + 25) );
+        }];
+        
+        UIImageView *imageV = [[UIImageView alloc] init];
+        imageV.image = [UIImage imageNamed:imageArr[i]];
+        [but addSubview:imageV];
+        
+        [imageV mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.mas_equalTo(0);
+            make.width.mas_equalTo(imageWH);
+            make.height.mas_equalTo(imageWH);
+            make.top.mas_equalTo(0);
+        }];
+        
+        UILabel *textLabel = [[UILabel alloc] init];
+        textLabel.textAlignment = NSTextAlignmentCenter;
+        textLabel.font = [UIFont systemFontOfSize:10.0];
+        textLabel.textColor = [UIColor whiteColor];
+        textLabel.text = titleArr[i];
+        [but addSubview:textLabel];
+        //textLabel.backgroundColor = [UIColor redColor];
+        
+        [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.mas_equalTo(0);
+            make.width.mas_equalTo(butWidth);
+            make.height.mas_equalTo(20);
+            make.top.equalTo(imageV.mas_bottom).offset(5);
+        }];
+        
+    }
+    
+    /**********************************************************************************/
+    UIButton *TVButton = [[UIButton alloc] init];
+    TVButton.tag = 100;
+    [TVButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [TVButton setTitle:NSLocalizedString(@"my_set_no_TV_p2p",nil) forState:(UIControlStateNormal)];
+    [TVButton setTitle:NSLocalizedString(@"my_set_no_close_TV_p2p",nil) forState:(UIControlStateSelected)];
+    TVButton.layer.cornerRadius = 12;
+    [TVButton.titleLabel setFont:[UIFont boldSystemFontOfSize:14.f]];
+    TVButton.backgroundColor = [UIColor hwColor:@"#29313D"];
+    [blackBgView addSubview:TVButton];
+   
+  
+    [TVButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(50);
+        make.left.mas_equalTo(12);
+        make.right.mas_equalTo(-12);
+        make.top.equalTo(bg2View.mas_bottom).offset(12);
+    }];
+}
+
+
+- (void)maskSwitchPressed:(UISwitch *)maskSwitch{
+    HLog(@"11111");
+//    [HWDataManager setBoolWithKey:Consn_Fanzhuan_Exit_app_Open value:maskSwitch.on];
+//    
+//    if (maskSwitch.on) {
+//        [[iToast makeText:NSLocalizedString(@"my_set_no_fanzhuan_exit_open",nil)] show];
+//    }
+//    else{
+//        [[iToast makeText:NSLocalizedString(@"my_set_no_fanzhuan_exit_close",nil)] show];
+//    }
+}
+
+#pragma mark 按钮事件
+- (void)didClickButtonFun:(UIButton*)but
+{
+    NSInteger tag = but.tag;
+    HLog(@"%ld",tag);
+    
+    [self removeFun];
+    if(tag == 1){
+        return;
+    }
+    
+    if(tag == 100 && but.selected){
+        tag = 101;
+    }
+    
+    if(_didClickButtonFun){
+        _didClickButtonFun(tag);
+    }
+}
+
+- (void)removeFun
+{
+    [self removeFromSuperview];
+}
+@end

+ 33 - 0
创维盒子/双子星云手机/Vendor/SYJUISwitch/SYJUISwitch.h

@@ -0,0 +1,33 @@
+//
+//  SYJUISwitch.h
+//  SYJUISwitch
+//
+//  Created by syj on 2021/8/17.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SYJUISwitch : UIControl
+
+@property (nullable, nonatomic, strong) UIColor *onTintColor;
+@property (nullable, nonatomic, strong) UIColor *offTintColor;
+@property (nullable, nonatomic, strong) UIColor *thumbTintColor; //滑块颜色
+@property (nullable, nonatomic, strong) UIImage *onImage; //滑块image
+@property (nullable, nonatomic, strong) UIImage *offImage; //滑块image
+@property (nonatomic, assign) CGFloat tailLength; //滑块拖尾长度,default = 7.0
+
+@property (nonatomic, getter=isOn) BOOL on;  //default = NO
+- (void)setOn:(BOOL)on animated:(BOOL)animated;
+
+@property (nonatomic, assign) CGFloat thumbLeftSpace; //滑块距离左边距离 default = 2.0
+@property (nonatomic, assign) CGFloat thumbTopSpace; //滑块距离右边距离 default = 2.0
+@property (nonatomic, assign) CGSize thumbSize; //滑块大小 default = (27, 27)
+- (void)setThumbLeftSpace:(CGFloat)thumbLeftSpace animated:(BOOL)animated;
+- (void)setThumbTopSpace:(CGFloat)thumbTopSpace animated:(BOOL)animated;
+- (void)setThumbSize:(CGSize)thumbSize animated:(BOOL)animated;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 306 - 0
创维盒子/双子星云手机/Vendor/SYJUISwitch/SYJUISwitch.m

@@ -0,0 +1,306 @@
+//
+//  SYJUISwitch.m
+//  SYJUISwitch
+//
+//  Created by syj on 2021/8/17.
+//
+
+#import "SYJUISwitch.h"
+
+@interface SYJUISwitch ()
+
+@property (nonatomic, strong) UIView *bgColorView; //背景色
+@property (nonatomic, strong) UIImageView *thumbImageView; //滑块
+
+@property (nonatomic, assign) CGSize tempThumbSize;
+@property (nonatomic, assign) BOOL tempIsOn;
+@property (nonatomic, assign) NSInteger moveCount; //记录移动次数
+
+@end
+
+@implementation SYJUISwitch
+
+
+- (id)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self initUI];
+    }
+    return self;
+}
+
+- (id)initWithCoder:(NSCoder *)aDecoder {
+    if( (self = [super initWithCoder:aDecoder]) ){
+        [self layoutIfNeeded];
+        [self initUI];
+    }
+    return self;
+}
+
+- (void)initUI {
+    self.backgroundColor = UIColor.clearColor;
+    CGRect selfFrame = CGRectZero;
+    if (CGRectEqualToRect(self.frame, CGRectZero)) {
+        selfFrame = CGRectMake(0, 0, 51, 31);
+    } else {
+        selfFrame = self.frame;
+    }
+    self.frame = selfFrame;
+    _onTintColor = [UIColor colorWithRed:103/255.0 green:204/255.0 blue:103/255.0 alpha:1];
+    _offTintColor = [UIColor colorWithRed:212/255.0 green:212/255.0 blue:212/255.0 alpha:1];
+    _thumbTintColor = UIColor.whiteColor;
+    _thumbLeftSpace = 2;
+    _thumbTopSpace = 2;
+    _thumbSize = CGSizeMake(self.bounds.size.height - _thumbLeftSpace*2, self.bounds.size.height - _thumbTopSpace*2);
+    _tailLength = 7;
+    
+    [self addSubview:self.bgColorView];
+    [self addSubview:self.thumbImageView];
+}
+
+#pragma mark - Touch方法
+- (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event {
+    _moveCount = 0;
+    _tempIsOn = self.isOn;
+    _tempThumbSize = _thumbSize;
+    _thumbSize.width = _thumbSize.width + _tailLength;
+    [self updateThumbFrame:self.on animated:YES];
+    [self sendActionsForControlEvents:UIControlEventEditingDidBegin];
+    return YES;
+}
+- (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event {
+    CGPoint location = [touch locationInView:self];
+//    NSLog(@"x = %f",location.x);
+    if (location.x <= 0) {
+        if ([self currentPositionIsOn]) {
+            [self updateThumbFrame:NO animated:YES];
+            [self updateUI:NO animated:YES];
+            _moveCount += 1;
+        }
+        
+    } else if (location.x >= self.bounds.size.width) {
+        if ([self currentPositionIsOn] == NO) {
+            [self updateThumbFrame:YES animated:YES];
+            [self updateUI:YES animated:YES];
+            _moveCount += 1;
+        }
+    }
+//    [self sendActionsForControlEvents:UIControlEventEditingChanged];
+    return YES;
+}
+
+- (void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event {
+    [self endTracking];
+}
+
+- (void)cancelTrackingWithEvent:(nullable UIEvent *)event {
+    [self endTracking];
+}
+
+- (void)endTracking {
+    _thumbSize = _tempThumbSize;
+    BOOL isOn = !self.isOn;
+    if (_moveCount >= 2) {
+        isOn = [self currentPositionIsOn];
+    }
+    [self setOn:isOn animated:YES];
+    if (_tempIsOn != self.isOn) {
+        [self sendActionsForControlEvents:UIControlEventValueChanged];
+    }
+    _moveCount = 0;
+}
+
+- (BOOL)currentPositionIsOn {
+    BOOL isOn = self.thumbImageView.center.x >= self.bounds.size.width/2.0;
+    return isOn;
+}
+
+- (void)layoutSubviews {
+    [super layoutSubviews];
+    self.bgColorView.frame = self.bounds;
+    self.bgColorView.layer.cornerRadius = self.bgColorView.frame.size.height/2.0;
+    
+    CGFloat x = self.on ? self.bounds.size.width - self.thumbSize.width - self.thumbLeftSpace : self.thumbLeftSpace;
+    self.thumbImageView.frame = CGRectMake(x, self.thumbTopSpace, self.thumbSize.width, self.thumbSize.height);
+    self.thumbImageView.layer.cornerRadius = self.thumbImageView.frame.size.height/2.0;
+}
+
+#pragma mark - Update
+- (void)updateThumbFrame:(BOOL)on animated:(BOOL)animated {
+    void (^taskBlock) (void) = ^{
+        CGFloat x = on ? self.bounds.size.width - self.thumbSize.width - self.thumbLeftSpace : self.thumbLeftSpace;
+        self.thumbImageView.frame = CGRectMake(x, self.thumbTopSpace, self.thumbSize.width, self.thumbSize.height);
+        self.thumbImageView.layer.cornerRadius = self.thumbImageView.frame.size.height/2.0;
+    };
+    
+    if (animated) {
+        [UIView animateKeyframesWithDuration:0.2 delay:0 options:UIViewKeyframeAnimationOptionAllowUserInteraction animations:^{
+            taskBlock();
+        } completion:^(BOOL finished) {
+            
+        }];
+    } else {
+        taskBlock();
+    }
+}
+
+- (void)updateUI:(BOOL)on animated:(BOOL)animated {
+    void (^taskBlock) (void) = ^{
+        if (on) {
+            self.bgColorView.backgroundColor = self.onTintColor;
+            if (self.onImage) {
+                self.thumbImageView.image = self.onImage;
+            } else {
+                self.thumbImageView.image = nil;
+            }
+        } else {
+            self.bgColorView.backgroundColor = self.offTintColor;
+            if (self.offImage) {
+                self.thumbImageView.image = self.offImage;
+            } else {
+                self.thumbImageView.image = nil;
+            }
+        }
+        self.thumbImageView.backgroundColor = self.thumbTintColor;
+    };
+    
+    if (animated) {
+        [UIView animateKeyframesWithDuration:0.2 delay:0 options:UIViewKeyframeAnimationOptionAllowUserInteraction animations:^{
+            taskBlock();
+        } completion:^(BOOL finished) {
+            
+        }];
+    } else {
+        taskBlock();
+    }
+}
+
+- (void)updateThumbPosition:(BOOL)on animated:(BOOL)animated {
+    
+    void (^taskBlock) (void) = ^{
+//        CGFloat x = on ? self.bounds.size.width - self.thumbSize.width - self.thumbLeftSpace : self.thumbLeftSpace;
+//        self.thumbImageView.frame = CGRectMake(x, self.thumbImageView.frame.origin.y, self.thumbSize.width, self.thumbSize.height);
+        self.thumbImageView.bounds = CGRectMake(0, 0, self.thumbSize.width, self.thumbSize.height);
+        CGPoint center = self.thumbImageView.center;
+        if (on) {
+            center.x = self.bounds.size.width - self.thumbImageView.frame.size.width/2.0 - self.thumbLeftSpace;
+        } else {
+            center.x = self.thumbImageView.frame.size.width/2.0 + self.thumbLeftSpace;
+        }
+        self.thumbImageView.center = center;
+        
+    };
+   
+    if (animated) {
+        [UIView animateKeyframesWithDuration:0.2 delay:0 options:UIViewKeyframeAnimationOptionAllowUserInteraction animations:^{
+            taskBlock();
+        } completion:^(BOOL finished) {
+            
+        }];
+    } else {
+        taskBlock();
+    }
+}
+
+#pragma mark - Set
+- (void)setOnTintColor:(UIColor *)onTintColor {
+    _onTintColor = onTintColor;
+    [self updateUI:self.on animated:YES];
+}
+
+- (void)setOffTintColor:(UIColor *)offTintColor {
+    _offTintColor = offTintColor;
+    [self updateUI:self.on animated:YES];
+}
+
+- (void)setThumbTintColor:(UIColor *)thumbTintColor {
+    _thumbTintColor = thumbTintColor;
+    [self updateUI:self.on animated:YES];
+}
+
+- (void)setOnImage:(UIImage *)onImage {
+    _onImage = onImage;
+    [self updateUI:self.on animated:YES];
+}
+
+- (void)setOffImage:(UIImage *)offImage {
+    _offImage = offImage;
+    [self updateUI:self.on animated:YES];
+}
+
+- (void)setThumbLeftSpace:(CGFloat)thumbLeftSpace {
+    _thumbLeftSpace = thumbLeftSpace;
+    [self updateThumbFrame:self.on animated:NO];
+}
+
+- (void)setThumbTopSpace:(CGFloat)thumbTopSpace {
+    _thumbTopSpace = thumbTopSpace;
+    [self updateThumbFrame:self.on animated:NO];
+}
+
+- (void)setThumbSize:(CGSize)thumbSize {
+    _thumbSize = thumbSize;
+    [self updateThumbFrame:self.on animated:NO];
+}
+
+- (void)setThumbLeftSpace:(CGFloat)thumbLeftSpace animated:(BOOL)animated {
+    _thumbLeftSpace = thumbLeftSpace;
+    [self updateThumbFrame:self.on animated:animated];
+}
+- (void)setThumbTopSpace:(CGFloat)thumbTopSpace animated:(BOOL)animated {
+    _thumbTopSpace = thumbTopSpace;
+    [self updateThumbFrame:self.on animated:animated];
+}
+- (void)setThumbSize:(CGSize)thumbSize animated:(BOOL)animated {
+    _thumbSize = thumbSize;
+    [self updateThumbFrame:self.on animated:animated];
+}
+
+- (void)setOn:(BOOL)on {
+    [self setOn:on animated:NO];
+}
+
+- (void)setOn:(BOOL)on animated:(BOOL)animated {
+    _on = on;
+    [self updateThumbFrame:on animated:animated];
+    [self updateUI:on animated:animated];
+//    NSLog(@"%@", on ? @"开":@"关");
+}
+
+- (void)setEnabled:(BOOL)enabled {
+    self.alpha = enabled ? 1.f : .5f;
+    [super setEnabled:enabled];
+}
+
+/// 忽略返回手势,防止与侧滑手势冲突
+- (BOOL)ignorePopGesture {
+    return YES;
+}
+
+- (UIView *)bgColorView {
+    if (!_bgColorView) {
+        _bgColorView = [UIView new];
+        _bgColorView.layer.masksToBounds = YES;
+        _bgColorView.backgroundColor = self.offTintColor;
+        _bgColorView.userInteractionEnabled = NO;
+    }
+    return _bgColorView;
+}
+
+- (UIImageView *)thumbImageView {
+    if (!_thumbImageView) {
+        _thumbImageView = [[UIImageView alloc] init];
+        _thumbImageView.backgroundColor = self.thumbTintColor;
+        _thumbImageView.layer.shadowColor = [UIColor blackColor].CGColor;
+        _thumbImageView.layer.shadowOffset = CGSizeMake(0.0, 3.0);
+        _thumbImageView.layer.shadowRadius = 3.0;
+        _thumbImageView.layer.shadowOpacity = 0.3;
+        _thumbImageView.layer.masksToBounds = YES;
+        _thumbImageView.userInteractionEnabled = NO;
+    }
+    return _thumbImageView;
+}
+
+
+@end

+ 3 - 0
创维盒子/双子星云手机/cloudPhone/websocket/webSocketManager.h

@@ -82,6 +82,9 @@ NS_ASSUME_NONNULL_BEGIN
 #pragma mark 获取云机系统镜像等信息
 - (void)getSysInfoFun;
 
+#pragma mark 云机截图保存到云机图库
+- (void)screenshotInCloudPhoneFun;
+
 //上传
 - (void)beginGotoUploadFileFunBy:(uploadFileDataModel *)uploadFileDataMod;
 - (void)suspendUploadFileFun;

+ 6 - 0
创维盒子/双子星云手机/cloudPhone/websocket/webSocketManager.m

@@ -887,5 +887,11 @@ static webSocketManager *webSocketManagerInstance = nil;
     [self send_data:commondStr];
 }
 
+#pragma mark 云机截图保存到云机图库
+- (void)screenshotInCloudPhoneFun{
+    NSString*taskUid = [iTools getTaskUidStr];
+    NSString *commondStr  = [RCCommandHelp commandCloudPhoneScreenshotWithTaskUid:taskUid];
+    [self send_data:commondStr];
+}
 
 @end

+ 3 - 1
创维盒子/双子星云手机/mine/mineViewController.m

@@ -12,6 +12,7 @@
 #import "AboutViewController.h"
 #import "clearCacheAlretViewController.h"
 #import "inputPWDViewController.h"
+#import "forgetSecretKeyViewController.h"
 
 @interface mineViewController ()
 @property(nonatomic,strong)UIButton *netButton;
@@ -141,7 +142,8 @@
         }
             break;
         case 13:{
-            [[iToast makeText:@"点击了联系客服"] show];
+           // forgetSecretKeyViewController *vc = [forgetSecretKeyViewController new];
+            //[self pushViewController:vc animated:YES];
         }
             break;
             

+ 7 - 2
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -169,9 +169,9 @@
 "my_set_no_fanzhuan_exit" = "翻转退出";
 "my_set_no_fanzhuan_exit_open" = "翻转退出,已开启";
 "my_set_no_fanzhuan_exit_close" = "翻转退出,已关闭";
-"my_set_no_restart_phone" = "重启空间";
+"my_set_no_restart_phone" = "重启云机";
 "my_set_no_modify_pwd" = "修改密码";
-"my_set_no_restart_phone_tips" = "你确定要重启空间?";
+"my_set_no_restart_phone_tips" = "你确定要重启云机?";
 "my_set_no_restart_phone_btn_ok" = "重启";
 
 
@@ -544,6 +544,11 @@
 "NAS_last_file_not_data_tip"   = "暂无最近使用记录";
 "cloudPhone_enter_tip"   = "进入云机";
 "cloudPhone_upload_app"   = "应用上传";
+"cloudPhone_nav_show_tip"   = "导航栏";
+"cloudPhone_fullScreen_show_tip"   = "全面屏";
+"cloudPhone_set_exit_tip"   = "退出云机";
+"cloudPhone_set_screenshot_tip"   = "截图";
+//"cloudPhone_screenshot_done_tip"   = "";
 "mine_net_LAN"   = "内网";
 "mine_net_WAN"   = "外网";
 "mine_help_title"   = "帮助与反馈";