|
@@ -12,8 +12,9 @@
|
|
|
#import "downloadThumbnailManager.h"
|
|
|
#import "downloadManager.h"
|
|
|
#import "uploadFileRecordViewController.h"
|
|
|
+#import "UIScrollView+EmptyDataSet.h"
|
|
|
|
|
|
-@interface downLoadPreviewViewController ()<UITableViewDelegate,UITableViewDataSource>
|
|
|
+@interface downLoadPreviewViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
|
|
|
@property (nonatomic, strong) UITableView *tableView;
|
|
|
@property (nonatomic, strong) UIButton *rightButton;
|
|
|
@property (nonatomic, strong) downloadFileBottomView *downloadFileBottomV;
|
|
@@ -106,6 +107,9 @@
|
|
|
_tableView.sectionHeaderTopPadding = 0;
|
|
|
}
|
|
|
|
|
|
+ //空数据引入第三方开源处理
|
|
|
+ _tableView.emptyDataSetSource = self;
|
|
|
+ _tableView.emptyDataSetDelegate = self;
|
|
|
}
|
|
|
|
|
|
return _tableView;
|
|
@@ -163,6 +167,28 @@
|
|
|
return 70;
|
|
|
}
|
|
|
|
|
|
+#pragma mark 空数据
|
|
|
+- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
|
|
|
+
|
|
|
+ NSString *imageName = @"uploadFile_noData";
|
|
|
+
|
|
|
+ return [UIImage imageNamed:imageName];
|
|
|
+}
|
|
|
+
|
|
|
+- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
|
|
|
+ NSString *text = NSLocalizedString(@"File_download_file_no_data",nil);
|
|
|
+
|
|
|
+ NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
|
|
|
+ NSForegroundColorAttributeName: HW999999Color};
|
|
|
+
|
|
|
+ return [[NSAttributedString alloc] initWithString:text attributes:attributes];
|
|
|
+}
|
|
|
+
|
|
|
+//调整图片位置
|
|
|
+- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
|
|
|
+ return -150;
|
|
|
+}
|
|
|
+
|
|
|
- (void)userCheckFilePreviewByRow:(NSInteger)row
|
|
|
{
|
|
|
if(row < _curCouldPhoneFileListMod.data.list.count){
|