Browse Source

1.首页部分UI

huangxiaodong 1 year ago
parent
commit
11ba076df3
19 changed files with 379 additions and 17 deletions
  1. 12 0
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 22 0
      创维盒子/双子星云手机/Assets.xcassets/NAS/nas_not_data.imageset/Contents.json
  3. BIN
      创维盒子/双子星云手机/Assets.xcassets/NAS/nas_not_data.imageset/nas_not_data@2x.png
  4. BIN
      创维盒子/双子星云手机/Assets.xcassets/NAS/nas_not_data.imageset/nas_not_data@3x.png
  5. 22 0
      创维盒子/双子星云手机/Assets.xcassets/common/common_eye_close_black.imageset/Contents.json
  6. BIN
      创维盒子/双子星云手机/Assets.xcassets/common/common_eye_close_black.imageset/common_eye_close_black@2x.png
  7. BIN
      创维盒子/双子星云手机/Assets.xcassets/common/common_eye_close_black.imageset/common_eye_close_black@3x.png
  8. 22 0
      创维盒子/双子星云手机/Assets.xcassets/common/common_eye_open_black.imageset/Contents.json
  9. BIN
      创维盒子/双子星云手机/Assets.xcassets/common/common_eye_open_black.imageset/common_eye_open_black@2x.png
  10. BIN
      创维盒子/双子星云手机/Assets.xcassets/common/common_eye_open_black.imageset/common_eye_open_black@3x.png
  11. 22 0
      创维盒子/双子星云手机/Assets.xcassets/common/common_right_back_arrow.imageset/Contents.json
  12. BIN
      创维盒子/双子星云手机/Assets.xcassets/common/common_right_back_arrow.imageset/common_right_back_arrow@2x.png
  13. BIN
      创维盒子/双子星云手机/Assets.xcassets/common/common_right_back_arrow.imageset/common_right_back_arrow@3x.png
  14. 115 4
      创维盒子/双子星云手机/NAS/NASViewController.m
  15. 4 4
      创维盒子/双子星云手机/NAS/view/NASCommonUsedView.m
  16. 16 0
      创维盒子/双子星云手机/NAS/view/NASLastFileView.h
  17. 132 0
      创维盒子/双子星云手机/NAS/view/NASLastFileView.m
  18. 9 8
      创维盒子/双子星云手机/NAS/view/NASMySpaceView.m
  19. 3 1
      创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

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

@@ -528,6 +528,10 @@
 		6B5D86742C22C63F008D25EA /* NASCommonUsedView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D86712C22C63F008D25EA /* NASCommonUsedView.h */; };
 		6B5D86752C22C63F008D25EA /* NASCommonUsedView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D86712C22C63F008D25EA /* NASCommonUsedView.h */; };
 		6B5D86762C22C63F008D25EA /* NASCommonUsedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D86722C22C63F008D25EA /* NASCommonUsedView.m */; };
+		6B5D86792C22D6E9008D25EA /* NASLastFileView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D86782C22D6E9008D25EA /* NASLastFileView.m */; };
+		6B5D867A2C22D6E9008D25EA /* NASLastFileView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D86772C22D6E9008D25EA /* NASLastFileView.h */; };
+		6B5D867B2C22D6E9008D25EA /* NASLastFileView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D86772C22D6E9008D25EA /* NASLastFileView.h */; };
+		6B5D867C2C22D6E9008D25EA /* NASLastFileView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D86782C22D6E9008D25EA /* NASLastFileView.m */; };
 		6B63179C2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B63179B2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.m */; };
 		6B63179D2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B63179A2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.h */; };
 		6B63179E2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B63179A2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.h */; };
@@ -1598,6 +1602,8 @@
 		6B5D866C2C22AE2B008D25EA /* NASMySpaceView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NASMySpaceView.m; sourceTree = "<group>"; };
 		6B5D86712C22C63F008D25EA /* NASCommonUsedView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NASCommonUsedView.h; sourceTree = "<group>"; };
 		6B5D86722C22C63F008D25EA /* NASCommonUsedView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NASCommonUsedView.m; sourceTree = "<group>"; };
+		6B5D86772C22D6E9008D25EA /* NASLastFileView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NASLastFileView.h; sourceTree = "<group>"; };
+		6B5D86782C22D6E9008D25EA /* NASLastFileView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NASLastFileView.m; sourceTree = "<group>"; };
 		6B63179A2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = videoPlayByAVPlayerViewController.h; sourceTree = "<group>"; };
 		6B63179B2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = videoPlayByAVPlayerViewController.m; sourceTree = "<group>"; };
 		6B6317A02BFD9DB500FF4FB4 /* ZFCustomControlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFCustomControlView.h; sourceTree = "<group>"; };
@@ -2792,6 +2798,8 @@
 				6B5D866C2C22AE2B008D25EA /* NASMySpaceView.m */,
 				6B5D86712C22C63F008D25EA /* NASCommonUsedView.h */,
 				6B5D86722C22C63F008D25EA /* NASCommonUsedView.m */,
+				6B5D86772C22D6E9008D25EA /* NASLastFileView.h */,
+				6B5D86782C22D6E9008D25EA /* NASLastFileView.m */,
 			);
 			path = view;
 			sourceTree = "<group>";
@@ -3425,6 +3433,7 @@
 				18FCE5482AD15E750020F623 /* PlayerViewController+AppDelegate.h in Headers */,
 				6B72724B2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h in Headers */,
 				6B72725F2B0E240F00C03F87 /* uploadFileRecordTableView.h in Headers */,
+				6B5D867A2C22D6E9008D25EA /* NASLastFileView.h in Headers */,
 				181E84F72A8F451D00292B96 /* MineViewCell.h in Headers */,
 				6B2C1E4E2C070ADE00FDCF82 /* ZFUtilities.h in Headers */,
 				6B8661D72BBA53B600B19846 /* noticeModel.h in Headers */,
@@ -3648,6 +3657,7 @@
 				6BD506DE2B9576A4006E7CB0 /* PlayerViewController+AppDelegate.h in Headers */,
 				6BD506DF2B9576A4006E7CB0 /* uploadFileRecordTableViewHeadView.h in Headers */,
 				6BD506E02B9576A4006E7CB0 /* uploadFileRecordTableView.h in Headers */,
+				6B5D867B2C22D6E9008D25EA /* NASLastFileView.h in Headers */,
 				6BD506E12B9576A4006E7CB0 /* MineViewCell.h in Headers */,
 				6B2C1E4F2C070ADE00FDCF82 /* ZFUtilities.h in Headers */,
 				6B8661D82BBA53B600B19846 /* noticeModel.h in Headers */,
@@ -4381,6 +4391,7 @@
 				6B4C0F712C0314BA0070EF2E /* DFPlayerResourceLoader.m in Sources */,
 				6B3AD6862BF48DBA0096D6B7 /* shareRecordDetailsHWViewController.m in Sources */,
 				6BD507BF2B9576A4006E7CB0 /* MySetViewController.m in Sources */,
+				6B5D867C2C22D6E9008D25EA /* NASLastFileView.m in Sources */,
 				6BD507C02B9576A4006E7CB0 /* downloadFileBottomView.m in Sources */,
 				6BD507C12B9576A4006E7CB0 /* FLAnimatedImageView.m in Sources */,
 				6BEA31772BB65606005167AA /* clearCacheAlretViewController.m in Sources */,
@@ -4686,6 +4697,7 @@
 				6B4C0F702C0314BA0070EF2E /* DFPlayerResourceLoader.m in Sources */,
 				6B3AD6852BF48DBA0096D6B7 /* shareRecordDetailsHWViewController.m in Sources */,
 				18C475502A8E0DB5006129C0 /* MySetViewController.m in Sources */,
+				6B5D86792C22D6E9008D25EA /* NASLastFileView.m in Sources */,
 				6B5D40342B4BE358000965CF /* downloadFileBottomView.m in Sources */,
 				A003F6C127D841FF00715CBF /* FLAnimatedImageView.m in Sources */,
 				6BEA31762BB65606005167AA /* clearCacheAlretViewController.m in Sources */,

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

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

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


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


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

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

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


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


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

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

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


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


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

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

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


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


+ 115 - 4
创维盒子/双子星云手机/NAS/NASViewController.m

@@ -8,10 +8,17 @@
 #import "NASViewController.h"
 #import "NASMySpaceView.h"
 #import "NASCommonUsedView.h"
+#import "shareSecretTableViewCell.h"
+#import "NASLastFileView.h"
 
-@interface NASViewController ()
+@interface NASViewController ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic,strong)UITableView*tableView;
+
+@property (nonatomic, strong) UIView*tableHeadView;
 @property (nonatomic, strong) NASMySpaceView* NASMySpaceV;
 @property (nonatomic, strong) NASCommonUsedView* NASCommonUsedV;
+
+@property (nonatomic,strong)NASLastFileView*NASLastFileV;
 @end
 
 @implementation NASViewController
@@ -101,12 +108,27 @@
         make.height.mas_equalTo(24);
     }];
     
+    
+    [self.view addSubview:self.tableView];
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.equalTo(welcomeImageV.mas_bottom).offset(20);
+        make.bottom.mas_equalTo(-TABBARHEIGHT);
+    }];
+    
+    _tableHeadView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 165+ 15 +120 + 15)];
+    //_tableHeadView.backgroundColor = [UIColor hwColor:@"#F6F8FA"];
+    _tableHeadView.backgroundColor = [UIColor clearColor];
+    self.tableView.tableHeaderView = _tableHeadView;
+    
     //我的空间
     _NASMySpaceV = [[NASMySpaceView alloc] init];
-    [self.view addSubview:_NASMySpaceV];
+    [_tableHeadView addSubview:_NASMySpaceV];
     
     [_NASMySpaceV mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.equalTo(welcomeImageV.mas_bottom).offset(20);
+        //make.top.equalTo(welcomeImageV.mas_bottom).offset(20);
+        make.top.mas_equalTo(0);;
         make.left.mas_equalTo(0);
         make.right.mas_equalTo(0);
         make.height.mas_equalTo(165);
@@ -114,7 +136,7 @@
     
     //常用功能
     _NASCommonUsedV = [[NASCommonUsedView alloc] init];
-    [self.view addSubview:_NASCommonUsedV];
+    [_tableHeadView addSubview:_NASCommonUsedV];
     
     [_NASCommonUsedV mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(_NASMySpaceV.mas_bottom).offset(15);
@@ -123,8 +145,97 @@
         make.height.mas_equalTo(120);
     }];
     
+}
+
+#pragma mark - 懒加载
+- (UITableView *)tableView{
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStylePlain];
+        _tableView.delegate = self;
+        _tableView.dataSource = self;
+        _tableView.showsVerticalScrollIndicator = NO;
+        _tableView.showsHorizontalScrollIndicator = NO;
+//        _tableView.contentInset = UIEdgeInsetsMake(-H_STATE_BAR, 0, 0, 0);
+        [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
+        [_tableView setSeparatorColor:[UIColor clearColor]];
+        //[_tableView setBackgroundColor:[UIColor hwColor:@"#FFFFFF"]];
+        [_tableView setBackgroundColor:[UIColor clearColor]];
+        //[_tableView setTableFooterView:[UIView new]];
+        [_tableView setBounces:YES];
+        
+        if (@available(iOS 15.0, *)) {
+            _tableView.sectionHeaderTopPadding = 0;
+        }
+        
+        _tableView.layer.cornerRadius = 8;
+        _tableView.layer.masksToBounds = YES;
+    }
+    
+    return _tableView;
+}
+
+- (NASLastFileView*)NASLastFileV
+{
+    if(!_NASLastFileV){
+        _NASLastFileV = [NASLastFileView new];
+    }
+    return  _NASLastFileV;
+}
+
+#pragma mark - 列表委托
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return 0;
+}
+
+- (shareSecretTableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    __block NSInteger row = indexPath.row;
+    static NSString *identifier = @"shareSecretTableViewCell";
+    
+    shareSecretTableViewCell * cell =  [tableView dequeueReusableCellWithIdentifier:identifier];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    if (!cell){
+        cell = [[shareSecretTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
+        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
+        [cell setBackgroundColor:[UIColor clearColor]];
+        [cell setAccessoryType:(UITableViewCellAccessoryNone)];
+    }
+    
+    
+//    if(row < _didSelectListArr.count){
+//        NASFilePicDataArrModel*dataModel = _didSelectListArr[row];
+//        cell.dataModel = dataModel;
+//    }
+    return cell;
+}
+
+- (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
+    return self.NASLastFileV;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
+    //return 54;//隐藏
     
+    return 54 + 200;//无数据
 }
 
+- (UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
+{
+    NSString *text =  NSLocalizedString(@"NAS_bottom_tip",nil);
+    UILabel *label = [[UILabel alloc] init];
+    label.text = [[NSString alloc] initWithFormat:@"-  %@  -",text];
+    label.textColor = [UIColor hwColor:@"#959799"];
+    label.font = [UIFont systemFontOfSize:12];
+    label.textAlignment = NSTextAlignmentCenter;
+    
+    return label;
+}
 
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
+    return 60.0;
+}
 @end

+ 4 - 4
创维盒子/双子星云手机/NAS/view/NASCommonUsedView.m

@@ -58,15 +58,15 @@
                           NSLocalizedString(@"set_file_Transfer_WWAN_title",nil),
                           NSLocalizedString(@"my_set_no_share",nil)];
     
-    NSArray *imageArr = @[NSLocalizedString(@"nas_backups_icon",nil),
-                          NSLocalizedString(@"nas_set_icon",nil),
-                          NSLocalizedString(@"nas_share_icon",nil)];
+    NSArray *imageArr = @[@"nas_backups_icon",
+                          @"nas_set_icon",
+                          @"nas_share_icon"];
     
     CGFloat butTopY = 50.0;
     CGFloat butWidth = 32.0;
     CGFloat butHeight = 32.0 +20 +5;
     CGFloat leftSpace = 26.0;
-    CGFloat butSpace = (SCREEN_W -26*2 - butWidth*4)/5.0;
+    CGFloat butSpace = (SCREEN_W -16*2 -leftSpace*2 - butWidth*4)/3.0;
     
     CGFloat LabelWidth = 60.0;
     

+ 16 - 0
创维盒子/双子星云手机/NAS/view/NASLastFileView.h

@@ -0,0 +1,16 @@
+//
+//  NASLastFileView.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/19.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NASLastFileView : UIView
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 132 - 0
创维盒子/双子星云手机/NAS/view/NASLastFileView.m

@@ -0,0 +1,132 @@
+//
+//  NASLastFileView.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/19.
+//
+
+#import "NASLastFileView.h"
+
+@interface NASLastFileView ()
+@property(nonatomic,strong) UILabel*titleLabel;
+@property(nonatomic,strong)UIButton *eyeButton;
+@end
+
+@implementation NASLastFileView
+
+- (id)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    
+    //self.backgroundColor = [UIColor clearColor];
+    [self drawAnyView];
+    
+    return self;
+}
+
+-(void)drawAnyView
+{
+    UIView *whiteBgView = [[UIView alloc] init];
+    whiteBgView.backgroundColor = [UIColor whiteColor];
+    [self addSubview:whiteBgView];
+    whiteBgView.layer.cornerRadius = 12;
+    whiteBgView.layer.masksToBounds = YES;
+    
+    [whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(0);
+        make.left.mas_equalTo(16);
+        make.right.mas_equalTo(-16);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    _titleLabel = [[UILabel alloc] init];
+    _titleLabel.font = [UIFont boldSystemFontOfSize:16.0];
+    _titleLabel.textColor = [UIColor hwColor:@"#0A132B"];
+    _titleLabel.text = NSLocalizedString(@"NAS_last_file",nil);
+    [whiteBgView addSubview:_titleLabel];
+    
+    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(16);
+        make.left.mas_equalTo(16);
+        make.right.mas_equalTo(-24-12-10);
+        make.height.mas_equalTo(20);
+    }];
+    
+    
+    //按钮
+    UIButton *rightButton = [[UIButton alloc] init];
+    [rightButton setBackgroundImage:[UIImage imageNamed:@"common_right_back_arrow"] forState:UIControlStateNormal];
+    rightButton.tag = 1;
+    [rightButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [whiteBgView addSubview:rightButton];
+    
+    [rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(16);
+        make.right.mas_equalTo(-12);
+        make.width.mas_equalTo(24);
+        make.height.mas_equalTo(24);
+    }];
+    
+    UIView *lineView = [[UIView alloc] init];
+    lineView.backgroundColor = [UIColor hwColor:@"#CFD1D4"];
+    [whiteBgView addSubview:lineView];
+
+    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(rightButton.mas_top).offset(5);
+        make.width.mas_equalTo(1);
+        make.right.equalTo(rightButton.mas_left).offset(-13);
+        make.bottom.equalTo(rightButton.mas_bottom).offset(-5);
+    }];
+    
+
+    //按钮
+    _eyeButton = [[UIButton alloc] init];
+    [_eyeButton setBackgroundImage:[UIImage imageNamed:@"common_eye_open_black"] forState:UIControlStateNormal];
+    [_eyeButton setBackgroundImage:[UIImage imageNamed:@"common_eye_close_black"] forState:UIControlStateSelected];
+    _eyeButton.tag = 2;
+    [_eyeButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [whiteBgView addSubview:_eyeButton];
+    
+    [_eyeButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(16);
+        make.right.equalTo(lineView.mas_left).offset(-14);
+        make.width.mas_equalTo(24);
+        make.height.mas_equalTo(24);
+    }];
+    
+    
+    //空白页
+    UIImageView* notDataImageV = [[UIImageView alloc] init];
+    notDataImageV.image = [UIImage imageNamed:@"nas_not_data"];
+    [whiteBgView addSubview:notDataImageV];
+    
+    [notDataImageV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(_titleLabel.mas_bottom).offset(20);
+        make.centerX.mas_equalTo(0);
+        make.width.mas_equalTo(160);
+        make.height.mas_equalTo(160);
+    }];
+    
+    UILabel *notDataLabel = [[UILabel alloc] init];
+    notDataLabel.font = [UIFont systemFontOfSize:14.0];
+    notDataLabel.textColor = [UIColor hwColor:@"#999999"];
+    notDataLabel.text = NSLocalizedString(@"NAS_last_file_not_data_tip",nil);
+    notDataLabel.textAlignment = NSTextAlignmentCenter;
+    [whiteBgView addSubview:notDataLabel];
+    
+    [notDataLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(notDataImageV.mas_bottom).offset(-10);
+        make.left.mas_equalTo(16);
+        make.right.mas_equalTo(-16);
+        make.height.mas_equalTo(20);
+    }];
+}
+
+
+#pragma mark 按钮事件
+- (void)didClickButtonFun:(UIButton*)but
+{
+    NSInteger tag = but.tag;
+    HLog(@"%ld",tag);
+}
+@end
+

+ 9 - 8
创维盒子/双子星云手机/NAS/view/NASMySpaceView.m

@@ -107,15 +107,16 @@
                           NSLocalizedString(@"my_set_no_music",nil),
                           NSLocalizedString(@"my_set_no_file",nil)];
     
-    NSArray *imageArr = @[NSLocalizedString(@"nas_picture_icon",nil),
-                          NSLocalizedString(@"nas_video_icon",nil),
-                          NSLocalizedString(@"nas_audio_icon",nil),
-                          NSLocalizedString(@"nas_file_icon",nil)];
+    NSArray *imageArr = @[@"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 butSpace = (SCREEN_W -16*2 - butWidth*titleArr.count)/5.0;
+    CGFloat leftSpace = 20.0;
+    CGFloat butSpace = (SCREEN_W -16*2 -leftSpace*2 - butWidth*titleArr.count)/3.0;
     
     
     for (int i=0; i<titleArr.count; i++) {
@@ -127,7 +128,7 @@
         [whiteBgView addSubview:imageV];
         
         [imageV mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.left.mas_equalTo(butSpace + (butWidth+butSpace)*i);
+            make.left.mas_equalTo(leftSpace + (butWidth+butSpace)*i);
             make.width.mas_equalTo(butWidth);
             make.height.mas_equalTo(butWidth);
             make.top.mas_equalTo(butTopY);
@@ -141,7 +142,7 @@
         [whiteBgView addSubview:textLabel];
         
         [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.left.mas_equalTo(butSpace + (butWidth+butSpace)*i);
+            make.left.mas_equalTo(leftSpace + (butWidth+butSpace)*i);
             make.width.mas_equalTo(butWidth);
             make.height.mas_equalTo(20);
             make.top.equalTo(imageV.mas_bottom).offset(5);
@@ -153,7 +154,7 @@
         [whiteBgView addSubview:but];
         
         [but mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.left.mas_equalTo(butSpace + (butWidth+butSpace)*i);
+            make.left.mas_equalTo(leftSpace + (butWidth+butSpace)*i);
             make.width.mas_equalTo(butWidth);
             make.height.mas_equalTo(butHeight);
             make.top.mas_equalTo(butTopY);

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

@@ -535,4 +535,6 @@
 "NAS_mySpace_title"   = "我的空间";
 "NAS_used_Space"   = "已用空间";
 "NAS_common_used"   = "常用功能";
-
+"NAS_last_file"   = "最近文件";
+"NAS_bottom_tip"   = "已经到底了";
+"NAS_last_file_not_data_tip"   = "暂无最近使用记录";