Просмотр исходного кода

1.nas页面添加应用 和搜索条

huangxiaodong месяцев назад: 9
Родитель
Сommit
7c0b839026

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

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

BIN
创维盒子/code/Assets.xcassets/NAS/nas_app_icon.imageset/nas_app_icon@2x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_app_icon.imageset/nas_app_icon@3x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_audio_icon.imageset/nas_audio_icon@2x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_audio_icon.imageset/nas_audio_icon@3x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_file_icon.imageset/nas_file_icon@2x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_file_icon.imageset/nas_file_icon@3x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_picture_icon.imageset/nas_picture_icon@2x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_picture_icon.imageset/nas_picture_icon@3x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_video_icon.imageset/nas_video_icon@2x.png


BIN
创维盒子/code/Assets.xcassets/NAS/nas_video_icon.imageset/nas_video_icon@3x.png


+ 20 - 3
创维盒子/code/NAS/NASViewController.m

@@ -43,6 +43,7 @@
 #import "queryHeartbeatModel.h"
 #import "BoxHeartbeatAlertTool.h"
 #import "searchBarView.h"
+#import "NasPreviewAPPViewController.h"
 
 @interface NASViewController ()<UITableViewDelegate,UITableViewDataSource>
 {
@@ -59,6 +60,8 @@
     imageVersionRenewTipView * RenewTipView;
     imageVersionUpdateDoneView* imageVersionUpdateDoneV;
     imageVersionUpdateFailView* imageVersionUpdateFailV;
+    
+    UILabel * tableFooterlabel;//
 }
 @property (nonatomic,strong)UITableView*tableView;
 
@@ -280,6 +283,7 @@
     label.font = [UIFont systemFontOfSize:12];
     label.textAlignment = NSTextAlignmentCenter;
     self.tableView.tableFooterView = label;
+    tableFooterlabel = label;
     
     KWeakSelf
     _NASMySpaceV.didClickButtonFun = ^(NSInteger tag) {
@@ -545,6 +549,12 @@
                 [self pushViewController:vc animated:YES];
             }
             break;
+        case 9:{
+            NasPreviewAPPViewController *vc = [NasPreviewAPPViewController new];
+            [self pushViewController:vc animated:YES];
+        }
+            break;
+            
         case 10:{
             previewImageOrVideoViewController *vc = [previewImageOrVideoViewController new];
             vc.isPhotoType = YES;
@@ -772,7 +782,7 @@
     
     BOOL isShowLastFileType = [HWDataManager getBoolWithKey:Const_last_file_show];
     if(!isShowLastFileType){
-        _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W, 165+ 15 +120 +54 + 15);
+        _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W,(42+ 14) + 165+ 15 +120 +54 + 15);
         
         [self.NASLastFileV mas_remakeConstraints:^(MASConstraintMaker *make) {
             make.top.equalTo(_NASCommonUsedV.mas_bottom).offset(15);
@@ -798,7 +808,7 @@
         
     }
     else if(_lastFileDataArr.count > 0){
-        _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W, 165+ 15 +120 +54 + 15);
+        _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W,(42+ 14) + 165+ 15 +120 +54 + 15);
         
         [self.NASLastFileV mas_remakeConstraints:^(MASConstraintMaker *make) {
             make.top.equalTo(_NASCommonUsedV.mas_bottom).offset(15);
@@ -822,7 +832,7 @@
         
     }
     else{
-        _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W, 165+ 15 +120 +254 + 15);
+        _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W,(42+ 14) + 165+ 15 +120 +254 + 15);
         
         [self.NASLastFileV mas_remakeConstraints:^(MASConstraintMaker *make) {
             make.top.equalTo(_NASCommonUsedV.mas_bottom).offset(15);
@@ -848,6 +858,13 @@
     
     KWeakSelf
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        
+        if(weakSelf.lastFileDataArr.count > 0){
+            weakSelf.tableView.tableFooterView = self->tableFooterlabel;
+        }
+        else{
+            weakSelf.tableView.tableFooterView = nil;
+        }
         [weakSelf.tableView reloadData];
     });
     

+ 16 - 0
创维盒子/code/NAS/NasPreviewAPPViewController.h

@@ -0,0 +1,16 @@
+//
+//  NasPreviewAPPViewController.h
+//  双子星云手机
+//
+//  Created by xd h on 2025/3/7.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NasPreviewAPPViewController : BaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

Разница между файлами не показана из-за своего большого размера
+ 1103 - 0
创维盒子/code/NAS/NasPreviewAPPViewController.m


+ 9 - 7
创维盒子/code/NAS/view/NASMySpaceView.m

@@ -117,21 +117,23 @@
     }];
     
     
-    NSArray *titleArr = @[NSLocalizedString(@"my_set_no_image_upload",nil),
+    NSArray *titleArr = @[NSLocalizedString(@"nas_app_title",nil),
+                          NSLocalizedString(@"my_set_no_image_upload",nil),
                           NSLocalizedString(@"my_set_no_video_upload",nil),
                           NSLocalizedString(@"my_set_no_music",nil),
                           NSLocalizedString(@"my_set_no_file",nil)];
     
-    NSArray *imageArr = @[@"nas_picture_icon",
+    NSArray *imageArr = @[@"nas_app_icon",
+                          @"nas_picture_icon",
                           @"nas_video_icon",
                           @"nas_audio_icon",
                           @"nas_file_icon"];
     
     CGFloat butTopY = 74.0;
-    CGFloat butWidth = 52.0;
-    CGFloat butHeight = 52.0 +20 +5;
-    CGFloat leftSpace = 20.0;
-    CGFloat butSpace = (SCREEN_W -16*2 -leftSpace*2 - butWidth*titleArr.count)/3.0;
+    CGFloat butWidth = 42.0;
+    CGFloat butHeight = 42.0 +20 +5;
+    CGFloat leftSpace = 18.0;
+    CGFloat butSpace = (SCREEN_W -16*2 -leftSpace*2 - butWidth*titleArr.count)/4.0;
     
     
     for (int i=0; i<titleArr.count; i++) {
@@ -164,7 +166,7 @@
         }];
         
         UIButton *but = [[UIButton alloc] init];
-        but.tag = 10+i;
+        but.tag = 10+i-1;//新加了一个在前面
         [but addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
         [whiteBgView addSubview:but];
         

+ 1 - 0
创维盒子/code/zh-Hans.lproj/Localizable.strings

@@ -669,4 +669,5 @@
 "cloudPhone_restart_box_msg"      = "重启设备过程中功能将暂时无法使用?";
 "cloudPhone_restarting_box_title"      = "盒子重启中...";
 "cloudPhone_restarting_box_msg"      = "重启设备预计需要5分钟";
+"nas_app_title"      = "应用";
 

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

@@ -136,6 +136,10 @@
 		18FCE5482AD15E750020F623 /* PlayerViewController+AppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 18FCE5462AD15E730020F623 /* PlayerViewController+AppDelegate.h */; };
 		18FCE5492AD15E750020F623 /* PlayerViewController+AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 18FCE5472AD15E750020F623 /* PlayerViewController+AppDelegate.m */; };
 		5D9E1B185552EF17AE8B5F24 /* libPods-计算器.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAE4E9905D1AB335F8657436 /* libPods-计算器.a */; };
+		6B03C0D02D7A9A82001DE5CB /* NasPreviewAPPViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B03C0CF2D7A9A82001DE5CB /* NasPreviewAPPViewController.m */; };
+		6B03C0D12D7A9A82001DE5CB /* NasPreviewAPPViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B03C0CE2D7A9A82001DE5CB /* NasPreviewAPPViewController.h */; };
+		6B03C0D22D7A9A82001DE5CB /* NasPreviewAPPViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B03C0CF2D7A9A82001DE5CB /* NasPreviewAPPViewController.m */; };
+		6B03C0D32D7A9A82001DE5CB /* NasPreviewAPPViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B03C0CE2D7A9A82001DE5CB /* NasPreviewAPPViewController.h */; };
 		6B05815B2AFC851E00D37290 /* mySetHeadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0581592AFC851E00D37290 /* mySetHeadView.h */; };
 		6B05815C2AFC851E00D37290 /* mySetHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B05815A2AFC851E00D37290 /* mySetHeadView.m */; };
 		6B0581602AFCD0DF00D37290 /* uploadImageOrVideoViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B05815E2AFCD0DF00D37290 /* uploadImageOrVideoViewController.h */; };
@@ -1663,6 +1667,8 @@
 		34FDFD4EDCAAF106290BB4FC /* Pods-隐私保护.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-隐私保护.debug.xcconfig"; path = "Target Support Files/Pods-隐私保护/Pods-隐私保护.debug.xcconfig"; sourceTree = "<group>"; };
 		41C5601DC8FC86BACEE00639 /* libPods-隐私保护.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-隐私保护.a"; sourceTree = BUILT_PRODUCTS_DIR; };
 		5A7C795CAC690A410AE1E306 /* libPods-隐私保护-双子星云手机UITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-隐私保护-双子星云手机UITests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		6B03C0CE2D7A9A82001DE5CB /* NasPreviewAPPViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NasPreviewAPPViewController.h; sourceTree = "<group>"; };
+		6B03C0CF2D7A9A82001DE5CB /* NasPreviewAPPViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NasPreviewAPPViewController.m; sourceTree = "<group>"; };
 		6B0581592AFC851E00D37290 /* mySetHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mySetHeadView.h; sourceTree = "<group>"; };
 		6B05815A2AFC851E00D37290 /* mySetHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = mySetHeadView.m; sourceTree = "<group>"; };
 		6B05815E2AFCD0DF00D37290 /* uploadImageOrVideoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadImageOrVideoViewController.h; sourceTree = "<group>"; };
@@ -3337,6 +3343,8 @@
 				6B39586E2C34FA25003FC6C3 /* NasPreviewVideoViewController.m */,
 				6B07E0AA2C3D1ED5004A3238 /* nasLastFileViewController.h */,
 				6B07E0AB2C3D1ED5004A3238 /* nasLastFileViewController.m */,
+				6B03C0CE2D7A9A82001DE5CB /* NasPreviewAPPViewController.h */,
+				6B03C0CF2D7A9A82001DE5CB /* NasPreviewAPPViewController.m */,
 			);
 			path = NAS;
 			sourceTree = "<group>";
@@ -4253,6 +4261,7 @@
 				6BEF9B852C64CDD300142B75 /* frpUploadModel.h in Headers */,
 				6B9354892BF2FE8700AA8D31 /* editTypeHeadView.h in Headers */,
 				6BC7414C2C240A670049BA8D /* webSocketManager+downloadFile.h in Headers */,
+				6B03C0D32D7A9A82001DE5CB /* NasPreviewAPPViewController.h in Headers */,
 				6B2C1E4A2C070ADE00FDCF82 /* ZFSpeedLoadingView.h in Headers */,
 				6BED888A2B4E819000F76DDC /* downloadFileRecordTableView.h in Headers */,
 				6B2C1E562C070ADE00FDCF82 /* UIScrollView+ZFPlayer.h in Headers */,
@@ -4554,6 +4563,7 @@
 				6BEF9B872C64CDD300142B75 /* frpUploadModel.h in Headers */,
 				6B93548A2BF2FE8700AA8D31 /* editTypeHeadView.h in Headers */,
 				6BC7414E2C240A670049BA8D /* webSocketManager+downloadFile.h in Headers */,
+				6B03C0D12D7A9A82001DE5CB /* NasPreviewAPPViewController.h in Headers */,
 				6B2C1E4B2C070ADE00FDCF82 /* ZFSpeedLoadingView.h in Headers */,
 				6BD506E52B9576A4006E7CB0 /* downloadFileRecordTableView.h in Headers */,
 				6B2C1E572C070ADE00FDCF82 /* UIScrollView+ZFPlayer.h in Headers */,
@@ -4989,6 +4999,7 @@
 				6B7E042F2C3E5A98004B4948 /* customDownloadManager.m in Sources */,
 				6B49BFBE2C90472600E17406 /* webRtcManager+StatisticsReport.m in Sources */,
 				6B7EA79B2BF5B4A6002D5CC2 /* NASFilePicModel.m in Sources */,
+				6B03C0D02D7A9A82001DE5CB /* NasPreviewAPPViewController.m in Sources */,
 				6BD5072E2B9576A4006E7CB0 /* HWToolListCell.m in Sources */,
 				6BD5072F2B9576A4006E7CB0 /* cloudPhoneExtraFileListModel.m in Sources */,
 				6BCCF1AE2D1E487B00BAF144 /* UpgradeInfoModel.m in Sources */,
@@ -5372,6 +5383,7 @@
 				6B7E042E2C3E5A98004B4948 /* customDownloadManager.m in Sources */,
 				6B49BFBB2C90472600E17406 /* webRtcManager+StatisticsReport.m in Sources */,
 				6B7EA7992BF5B4A6002D5CC2 /* NASFilePicModel.m in Sources */,
+				6B03C0D22D7A9A82001DE5CB /* NasPreviewAPPViewController.m in Sources */,
 				A084D68E27E859D300054880 /* HWToolListCell.m in Sources */,
 				6B45C4FE2B57BC87007E6911 /* cloudPhoneExtraFileListModel.m in Sources */,
 				6BCCF1AD2D1E487B00BAF144 /* UpgradeInfoModel.m in Sources */,