|
@@ -18,18 +18,18 @@
|
|
#import "backupsFilerecordTableView.h"
|
|
#import "backupsFilerecordTableView.h"
|
|
#import "backupsFileManager.h"
|
|
#import "backupsFileManager.h"
|
|
#import "photosBackupsTaskModel.h"
|
|
#import "photosBackupsTaskModel.h"
|
|
-
|
|
|
|
|
|
+#import "downloadManager.h"
|
|
|
|
+#import "downloadFileRecordTableView.h"
|
|
|
|
|
|
@interface uploadFileRecordViewController ()<UIScrollViewDelegate>
|
|
@interface uploadFileRecordViewController ()<UIScrollViewDelegate>
|
|
|
|
|
|
//选中的项
|
|
//选中的项
|
|
@property (nonatomic, strong) NSMutableArray *indexPathsForSelectedItems;
|
|
@property (nonatomic, strong) NSMutableArray *indexPathsForSelectedItems;
|
|
@property (nonatomic, strong) uploadFileRecordheadView *uploadFileRecordheadV;
|
|
@property (nonatomic, strong) uploadFileRecordheadView *uploadFileRecordheadV;
|
|
-//@property (nonatomic, strong) uploadFileRecordBodyView *uploadFileRecordBodyV;
|
|
|
|
|
|
|
|
@property (nonatomic, strong) uploadFileRecordBgScorllView *uploadFileRecordBgScorllV;
|
|
@property (nonatomic, strong) uploadFileRecordBgScorllView *uploadFileRecordBgScorllV;
|
|
@property (nonatomic, strong) uploadFileRecordTableView *leftTableView;
|
|
@property (nonatomic, strong) uploadFileRecordTableView *leftTableView;
|
|
-@property (nonatomic, strong) uploadFileRecordTableView *midTableView;
|
|
|
|
|
|
+@property (nonatomic, strong) downloadFileRecordTableView *midTableView;
|
|
@property (nonatomic, strong) backupsFilerecordTableView *rightTableView;
|
|
@property (nonatomic, strong) backupsFilerecordTableView *rightTableView;
|
|
|
|
|
|
//@property (nonatomic,strong) uploadFileRecordTableViewHeadView *leftHeadView;
|
|
//@property (nonatomic,strong) uploadFileRecordTableViewHeadView *leftHeadView;
|
|
@@ -59,6 +59,8 @@
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(backupsFileRefreshFun:) name:backupsFileRefreshNotification object:nil];
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(backupsFileRefreshFun:) name:backupsFileRefreshNotification object:nil];
|
|
|
|
|
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadFileRefreshFun:) name:downloadFileRefreshNotification object:nil];
|
|
|
|
+
|
|
[self.view setBackgroundColor:[UIColor whiteColor]];
|
|
[self.view setBackgroundColor:[UIColor whiteColor]];
|
|
|
|
|
|
self.titleLabel.text = NSLocalizedString(@"my_set_no_File_Transfer_List",nil) ;
|
|
self.titleLabel.text = NSLocalizedString(@"my_set_no_File_Transfer_List",nil) ;
|
|
@@ -68,19 +70,42 @@
|
|
[self.navBarBGView setHidden:NO];
|
|
[self.navBarBGView setHidden:NO];
|
|
self.navBarBGView.backgroundColor = [UIColor whiteColor];
|
|
self.navBarBGView.backgroundColor = [UIColor whiteColor];
|
|
|
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
|
- [self initbaseUIFun];
|
|
|
|
- [self getDataInDatabaseFun];
|
|
|
|
- [self getBackupsDatabaseFun];
|
|
|
|
- });
|
|
|
|
|
|
+ [self initbaseUIFun];
|
|
}
|
|
}
|
|
|
|
|
|
- (void)viewWillAppear:(BOOL)animated
|
|
- (void)viewWillAppear:(BOOL)animated
|
|
{
|
|
{
|
|
[super viewWillAppear:animated];
|
|
[super viewWillAppear:animated];
|
|
|
|
|
|
|
|
+ [self getAllDataFun];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#pragma mark 获取数据
|
|
|
|
+- (void)getAllDataFun
|
|
|
|
+{
|
|
|
|
+ if(!_isUploadingType){
|
|
|
|
+ [self getUploadDataInDatabaseFun];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(!_isDownloadingType){
|
|
|
|
+ [self getDownloadDataInDatabaseFun:YES];
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ KWeakSelf
|
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
|
+ [weakSelf delayChangeUIFun];
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [self getBackupsDatabaseFun];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+- (void)delayChangeUIFun
|
|
|
|
+{
|
|
|
|
+ _selectIndex = 2;
|
|
|
|
+ [self didClickHeadFun:_selectIndex];
|
|
|
|
+ [self didScorllBodyFun:_selectIndex];
|
|
|
|
+}
|
|
|
|
|
|
#pragma mark UI
|
|
#pragma mark UI
|
|
- (void)initbaseUIFun
|
|
- (void)initbaseUIFun
|
|
@@ -101,9 +126,8 @@
|
|
[weakSelf didClickHeadFun: index];
|
|
[weakSelf didClickHeadFun: index];
|
|
};
|
|
};
|
|
|
|
|
|
-// CGRect rrr2= self.navBarBGView.frame;
|
|
|
|
-// CGRect rrr= _uploadFileRecordheadV.frame;
|
|
|
|
- CGFloat curHeight = SCREEN_H - CGRectGetMaxY(self.navBarBGView.frame) - 50 - 15;
|
|
|
|
|
|
+ //CGFloat curHeight = SCREEN_H - CGRectGetMaxY(self.navBarBGView.frame) - 50 - 15;
|
|
|
|
+ CGFloat curHeight = SCREEN_H - (H_STATE_BAR + 64.f) - 50 - 15;
|
|
|
|
|
|
|
|
|
|
_uploadFileRecordBgScorllV= [[uploadFileRecordBgScorllView alloc] init];
|
|
_uploadFileRecordBgScorllV= [[uploadFileRecordBgScorllView alloc] init];
|
|
@@ -140,7 +164,7 @@
|
|
[weakSelf RefreshUploadViewFun];
|
|
[weakSelf RefreshUploadViewFun];
|
|
};
|
|
};
|
|
|
|
|
|
- _midTableView = [[uploadFileRecordTableView alloc] init];
|
|
|
|
|
|
+ _midTableView = [[downloadFileRecordTableView alloc] init];
|
|
_midTableView.tag = 101;
|
|
_midTableView.tag = 101;
|
|
[_uploadFileRecordBgScorllV addSubview:_midTableView];
|
|
[_uploadFileRecordBgScorllV addSubview:_midTableView];
|
|
|
|
|
|
@@ -155,6 +179,11 @@
|
|
weakSelf.isEditType = YES;
|
|
weakSelf.isEditType = YES;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ _midTableView.didClickSectionHeadViewRightButton = ^(NSInteger section) {
|
|
|
|
+ [weakSelf didClikRightButInDownloadTableVieFunBy:section];
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+
|
|
_rightTableView = [[backupsFilerecordTableView alloc] init];
|
|
_rightTableView = [[backupsFilerecordTableView alloc] init];
|
|
_rightTableView.tag = 102;
|
|
_rightTableView.tag = 102;
|
|
[_uploadFileRecordBgScorllV addSubview:_rightTableView];
|
|
[_uploadFileRecordBgScorllV addSubview:_rightTableView];
|
|
@@ -358,12 +387,6 @@
|
|
{
|
|
{
|
|
|
|
|
|
[self realGotoUploadFile:indexPathsForSelectedItems];
|
|
[self realGotoUploadFile:indexPathsForSelectedItems];
|
|
-// KWeakSelf
|
|
|
|
-// [[uploadFileManager shareInstance] getDataInDatabaseFun:YES complete:^(NSMutableArray * _Nonnull Arr) {
|
|
|
|
-//
|
|
|
|
-// [weakSelf realGotoUploadFile:indexPathsForSelectedItems];
|
|
|
|
-// }];
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- (void)realGotoUploadFile:(NSMutableArray *)indexPathsForSelectedItems
|
|
- (void)realGotoUploadFile:(NSMutableArray *)indexPathsForSelectedItems
|
|
@@ -377,20 +400,15 @@
|
|
weakSelf.leftTableView.outSideDataArr = Arr;
|
|
weakSelf.leftTableView.outSideDataArr = Arr;
|
|
[weakSelf.leftTableView reloadDataFun];
|
|
[weakSelf.leftTableView reloadDataFun];
|
|
|
|
|
|
- //weakSelf.midTableView.curDataArr = Arr[1];
|
|
|
|
- [weakSelf.midTableView reloadDataFun];
|
|
|
|
-
|
|
|
|
-// weakSelf.rightTableView.curDataArr = Arr[2];
|
|
|
|
-// [weakSelf.rightTableView reloadDataFun];
|
|
|
|
}];
|
|
}];
|
|
}
|
|
}
|
|
|
|
|
|
#pragma mark 读取数据库数据
|
|
#pragma mark 读取数据库数据
|
|
-- (void)getDataInDatabaseFun
|
|
|
|
|
|
+- (void)getUploadDataInDatabaseFun
|
|
{
|
|
{
|
|
|
|
|
|
KWeakSelf
|
|
KWeakSelf
|
|
- [[uploadFileManager shareInstance] getDataInDatabaseFun:_isNotUploadingType complete:^(NSMutableArray * _Nonnull Arr) {
|
|
|
|
|
|
+ [[uploadFileManager shareInstance] getDataInDatabaseFun:YES complete:^(NSMutableArray * _Nonnull Arr) {
|
|
//[weakSelf setRecordBodyDataFunBy:Arr];
|
|
//[weakSelf setRecordBodyDataFunBy:Arr];
|
|
|
|
|
|
if(!Arr ||Arr.count != 3){
|
|
if(!Arr ||Arr.count != 3){
|
|
@@ -400,7 +418,7 @@
|
|
|
|
|
|
NSMutableArray *curLoadIngArr = Arr[0];
|
|
NSMutableArray *curLoadIngArr = Arr[0];
|
|
//不是上传视频和进来的 所以上传状态(上传中和等待)改为暂停
|
|
//不是上传视频和进来的 所以上传状态(上传中和等待)改为暂停
|
|
- if(self->_isNotUploadingType && ![uploadFileManager shareInstance].isUploadIngType){
|
|
|
|
|
|
+ if(![uploadFileManager shareInstance].isUploadIngType){
|
|
for (uploadFileDataModel * curModel in curLoadIngArr) {
|
|
for (uploadFileDataModel * curModel in curLoadIngArr) {
|
|
curModel.curUploadStateType = uploadStateSuspend;
|
|
curModel.curUploadStateType = uploadStateSuspend;
|
|
}
|
|
}
|
|
@@ -417,56 +435,6 @@
|
|
});
|
|
});
|
|
}];
|
|
}];
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-// _allDataArr = [NSMutableArray new];
|
|
|
|
-//
|
|
|
|
-// KWeakSelf
|
|
|
|
-// [uploadFileDataModel bg_findAllAsync:upLoadFile_image_tableName complete:^(NSArray * _Nullable array) {
|
|
|
|
-// NSMutableArray *failArr = [NSMutableArray new];
|
|
|
|
-// NSMutableArray *doneArr = [NSMutableArray new];
|
|
|
|
-// NSMutableArray *otherArr = [NSMutableArray new];
|
|
|
|
-//
|
|
|
|
-// for (uploadFileDataModel * curModel in array) {
|
|
|
|
-//
|
|
|
|
-// //图片 和视频 还原
|
|
|
|
-// if(curModel.curUploadFileType == uploadFileTypeImage){
|
|
|
|
-// NSString*pathStr = [cachesFileManager getFilePathWithName:curModel.filename type:uploadFileTypeImage];
|
|
|
|
-// curModel.imageData = [NSData dataWithContentsOfFile:pathStr];
|
|
|
|
-// }
|
|
|
|
-// else if(curModel.curUploadFileType == uploadFileTypeVideo){
|
|
|
|
-// NSString*pathStr = [cachesFileManager getFilePathWithName:curModel.videoFirstImageName type:uploadFileTypeImage];
|
|
|
|
-// curModel.imageData = [NSData dataWithContentsOfFile:pathStr];
|
|
|
|
-//
|
|
|
|
-// if(curModel.curUploadStateType != uploadStateDone){
|
|
|
|
-// NSString*videoPathStr = [cachesFileManager getFilePathWithName:curModel.filename type:uploadFileTypeVideo];
|
|
|
|
-// curModel.videoData = [NSData dataWithContentsOfFile:videoPathStr];
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// if(curModel.curUploadStateType == uploadStateFail){
|
|
|
|
-// [failArr addObject:curModel];
|
|
|
|
-// }
|
|
|
|
-// else if(curModel.curUploadStateType == uploadStateDone){
|
|
|
|
-// [doneArr addObject:curModel];
|
|
|
|
-// }
|
|
|
|
-// else{
|
|
|
|
-// //不是上传视频和进来的 所以上传状态(上传中和等待)改为暂停
|
|
|
|
-// if(self->_isNotUploadingType && ![uploadFileManager shareInstance].isUploadIngType){
|
|
|
|
-// curModel.curUploadStateType = uploadStateSuspend;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// [otherArr addObject:curModel];
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// [self->_allDataArr addObject:otherArr];
|
|
|
|
-// [self->_allDataArr addObject:doneArr];
|
|
|
|
-// [self->_allDataArr addObject:failArr];
|
|
|
|
-//
|
|
|
|
-// self->_uploadFileRecordBodyV.allDataArr = self->_allDataArr;
|
|
|
|
-// }];
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- (void)getBackupsDatabaseFun
|
|
- (void)getBackupsDatabaseFun
|
|
@@ -480,6 +448,36 @@
|
|
}];
|
|
}];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#pragma mark 读取数据库数据
|
|
|
|
+- (void)getDownloadDataInDatabaseFun:(BOOL)isRegetType
|
|
|
|
+{
|
|
|
|
+ KWeakSelf
|
|
|
|
+ [[downloadManager shareInstance] getDataInDatabaseFun:isRegetType complete:^(NSMutableArray * _Nonnull Arr) {
|
|
|
|
+
|
|
|
|
+ if(!Arr ||Arr.count != 3){
|
|
|
|
+ HLog(@"数据库出错\n\n\n");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ NSMutableArray *curLoadIngArr = Arr[0];
|
|
|
|
+ //不是上传视频和进来的 所以上传状态(上传中和等待)改为暂停
|
|
|
|
+ if(![downloadManager shareInstance].isDownloadIngType){
|
|
|
|
+ for (couldPhoneFileModel * curModel in curLoadIngArr) {
|
|
|
|
+ curModel.curDownloadStateType = downloadStateSuspend;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ mainBlock(^{
|
|
|
|
+ weakSelf.midTableView.outSideDataArr = Arr;
|
|
|
|
+ [weakSelf.midTableView reloadDataFun];
|
|
|
|
+
|
|
|
|
+ //[weakSelf handleUploadingRightButFun];
|
|
|
|
+ });
|
|
|
|
+ }];
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
#pragma mark 处理上传中的 全部暂停等
|
|
#pragma mark 处理上传中的 全部暂停等
|
|
- (void)handleUploadingRightButFun
|
|
- (void)handleUploadingRightButFun
|
|
{
|
|
{
|
|
@@ -503,23 +501,6 @@
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-#pragma mark 给RecordBody 设置数据
|
|
|
|
-//- (void)setRecordBodyDataFunBy:(NSMutableArray*)arr
|
|
|
|
-//{
|
|
|
|
-// if(!arr || ![arr isKindOfClass:[NSMutableArray class]] || arr.count !=3){
|
|
|
|
-// return;
|
|
|
|
-// }
|
|
|
|
-// //不是上传视频和进来的 所以上传状态(上传中和等待)改为暂停
|
|
|
|
-// if(self->_isNotUploadingType && ![uploadFileManager shareInstance].isUploadIngType){
|
|
|
|
-// NSMutableArray *otherArr = arr[0];
|
|
|
|
-// for (uploadFileDataModel * curModel in otherArr) {
|
|
|
|
-// curModel.curUploadStateType = uploadStateSuspend;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //_uploadFileRecordBodyV.allDataArr = arr;
|
|
|
|
-//}
|
|
|
|
|
|
|
|
- (void)uploadFileRefreshFun:(NSNotification*)not
|
|
- (void)uploadFileRefreshFun:(NSNotification*)not
|
|
{
|
|
{
|
|
@@ -817,4 +798,127 @@
|
|
photosBackupsTaskMod.curTimeInterval = [[NSDate date] timeIntervalSince1970];
|
|
photosBackupsTaskMod.curTimeInterval = [[NSDate date] timeIntervalSince1970];
|
|
_rightTableView.photosBackupsIngTaskModel = photosBackupsTaskMod;
|
|
_rightTableView.photosBackupsIngTaskModel = photosBackupsTaskMod;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+-(void)gotoDownloadFile:(NSMutableArray*)selectedItems
|
|
|
|
+{
|
|
|
|
+ KWeakSelf
|
|
|
|
+ [[downloadManager shareInstance] handleCouldPhoneFileModelToDownloadFileDataFunBy:selectedItems complete:^(NSMutableArray * _Nonnull Arr) {
|
|
|
|
+
|
|
|
|
+ if(!Arr ||Arr.count != 3){
|
|
|
|
+ HLog(@"数据库出错\n\n\n");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ NSMutableArray *curLoadIngArr = Arr[0];
|
|
|
|
+
|
|
|
|
+ mainBlock(^{
|
|
|
|
+ weakSelf.midTableView.outSideDataArr = Arr;
|
|
|
|
+ [weakSelf.midTableView reloadDataFun];
|
|
|
|
+ //[weakSelf handleUploadingRightButFun];
|
|
|
|
+ });
|
|
|
|
+ }];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+- (void)downloadFileRefreshFun:(NSNotification*)not
|
|
|
|
+{
|
|
|
|
+ couldPhoneFileModel *downloadTaskMod = [not object];
|
|
|
|
+ HLog(@"hhhhhhh1 %@ didDownloadBytes:%ld",downloadTaskMod.name,downloadTaskMod.didDownloadBytes);
|
|
|
|
+
|
|
|
|
+ downloadTaskMod.curTimeInterval = [[NSDate date] timeIntervalSince1970];
|
|
|
|
+
|
|
|
|
+ if(downloadTaskMod.curDownloadStateType == downloadStateDone){
|
|
|
|
+ [self getDownloadDataInDatabaseFun:NO];
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ [_midTableView RefreshAllDataFun];
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#pragma mark 1.3版本UI修改后 下载文件列表的头部点击事件
|
|
|
|
+- (void)didClikRightButInDownloadTableVieFunBy:(NSInteger)section
|
|
|
|
+{
|
|
|
|
+ if(section == 0){
|
|
|
|
+ [self didClickAllSuspendInDownLoadingFun];
|
|
|
|
+ }
|
|
|
|
+ else if(section == 1){//成功
|
|
|
|
+ [self didClickClearDownLoadRecordInDoneFun];
|
|
|
|
+ }
|
|
|
|
+ else if(section == 2){//失败
|
|
|
|
+ [self didClickClearRecordInDownLoadFailFun];
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#pragma mark 点击下载中的全部暂停
|
|
|
|
+- (void)didClickAllSuspendInDownLoadingFun
|
|
|
|
+{
|
|
|
|
+ _midTableView.downloadingHeadView.rightButton.selected = !_midTableView.downloadingHeadView.rightButton.selected;
|
|
|
|
+
|
|
|
|
+ if(_midTableView.downloadingHeadView.rightButton.selected){
|
|
|
|
+ [[downloadManager shareInstance] suspendDownloadFileFun:YES];
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ NSMutableArray *leftArr = _midTableView.downloadingArr;
|
|
|
|
+ [[downloadManager shareInstance] reDownloadFileFunBy:leftArr];
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#pragma mark 点击下载成功的清空记录
|
|
|
|
+- (void)didClickClearDownLoadRecordInDoneFun
|
|
|
|
+{
|
|
|
|
+ /*弹窗提示二次确认*/
|
|
|
|
+ KWeakSelf
|
|
|
|
+ ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"File_upload_Record_clear_Tip_title",nil)
|
|
|
|
+ msg:NSLocalizedString(@"File_upload_Record_clear_done_Tip_msg",nil)
|
|
|
|
+ imageStr:nil
|
|
|
|
+ cancelTitle:NSLocalizedString(@"other_cancel",nil)
|
|
|
|
+ okTitle:NSLocalizedString(@"other_comment_ok",nil) isOkBtnHighlight:YES
|
|
|
|
+ didClickOk:^{
|
|
|
|
+ [weakSelf ClearAllRecordInDownloadDoneFun];
|
|
|
|
+ } didClickCancel:^{
|
|
|
|
+
|
|
|
|
+ }];
|
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
|
+
|
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
|
+ }];
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+- (void)ClearAllRecordInDownloadDoneFun
|
|
|
|
+{
|
|
|
|
+ [[downloadManager shareInstance] deleteDownloadFileRecordBy:_midTableView.downloadDoneArr withDelCache:YES];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#pragma mark 点击上传失败的清空记录
|
|
|
|
+- (void)didClickClearRecordInDownLoadFailFun
|
|
|
|
+{
|
|
|
|
+ /*弹窗提示二次确认*/
|
|
|
|
+ KWeakSelf
|
|
|
|
+ ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"File_upload_Record_clear_Tip_title",nil)
|
|
|
|
+ msg:NSLocalizedString(@"File_upload_Record_clear_fail_Tip_msg",nil)
|
|
|
|
+ imageStr:nil
|
|
|
|
+ cancelTitle:NSLocalizedString(@"other_cancel",nil)
|
|
|
|
+ okTitle:NSLocalizedString(@"other_comment_ok",nil) isOkBtnHighlight:YES
|
|
|
|
+ didClickOk:^{
|
|
|
|
+ [weakSelf ClearAllRecordInDownloadFailFun];
|
|
|
|
+ } didClickCancel:^{
|
|
|
|
+
|
|
|
|
+ }];
|
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
|
+
|
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
|
+ }];
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+- (void)ClearAllRecordInDownloadFailFun
|
|
|
|
+{
|
|
|
|
+ [[downloadManager shareInstance] deleteDownloadFileRecordBy:_midTableView.downloadfailArr withDelCache:YES];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
@end
|
|
@end
|