|
@@ -101,19 +101,19 @@
|
|
|
|
|
|
#pragma mark - 列表委托
|
|
#pragma mark - 列表委托
|
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
|
- return 1;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
|
|
|
if(!_audioArr){
|
|
if(!_audioArr){
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
return _audioArr.count;
|
|
return _audioArr.count;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
|
|
|
+ return 1;
|
|
|
|
+}
|
|
|
|
+
|
|
- (recordFileCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
|
- (recordFileCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
|
|
|
|
|
- __block NSInteger row = indexPath.row;
|
|
|
|
|
|
+ __block NSInteger row = indexPath.section;
|
|
static NSString *identifier = @"recordFileCell";
|
|
static NSString *identifier = @"recordFileCell";
|
|
|
|
|
|
recordFileCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
|
recordFileCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
|
@@ -143,7 +143,7 @@
|
|
|
|
|
|
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
|
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
|
|
|
|
|
- NSInteger row = indexPath.row;
|
|
|
|
|
|
+ NSInteger row = indexPath.section;
|
|
if(row >=_audioArr.count){
|
|
if(row >=_audioArr.count){
|
|
return 0.0;
|
|
return 0.0;
|
|
}
|
|
}
|
|
@@ -156,22 +156,26 @@
|
|
return 65;
|
|
return 65;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
|
|
|
|
+{
|
|
|
|
+ return [UIView new];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
|
|
|
+ return 12.0;
|
|
|
|
+}
|
|
|
|
+
|
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
|
{
|
|
{
|
|
- NSInteger row = indexPath.row;
|
|
|
|
-// if(row < _curNASFileAudioMod.data.list.count){
|
|
|
|
-//
|
|
|
|
-// NASFilePicDataArrModel *dataModel = _curNASFileAudioMod.data.list[row];
|
|
|
|
-// //videoPlayViewController *vc = [videoPlayViewController new];
|
|
|
|
-// videoPlayByAVPlayerViewController *vc = [videoPlayByAVPlayerViewController new];
|
|
|
|
-// vc.VideoDataMode = dataModel;
|
|
|
|
-// [self.navigationController pushViewController:vc animated:YES];
|
|
|
|
-//
|
|
|
|
-// KWeakSelf
|
|
|
|
-// vc.didNeedDeleteFile = ^(NSString * _Nonnull filePath) {
|
|
|
|
-// [weakSelf deleteNetDataByFilePath:filePath];
|
|
|
|
-// };
|
|
|
|
-// }
|
|
|
|
|
|
+ NSInteger row = indexPath.section;
|
|
|
|
+ if(row < _audioArr.count){
|
|
|
|
+ recordFileModel *model = _audioArr[row];
|
|
|
|
+ if(!model.showAllType){
|
|
|
|
+ model.showAllType = YES;
|
|
|
|
+
|
|
|
|
+ [tableView reloadData];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
#pragma mark 空数据
|
|
#pragma mark 空数据
|
|
@@ -183,7 +187,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
|
|
- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
|
|
- NSString *text = NSLocalizedString(@"common_no_data_tip",nil);
|
|
|
|
|
|
+ NSString *text = NSLocalizedString(@"record_no_data_tip",nil);
|
|
|
|
|
|
NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
|
|
NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
|
|
NSForegroundColorAttributeName: HW999999Color};
|
|
NSForegroundColorAttributeName: HW999999Color};
|
|
@@ -210,6 +214,7 @@
|
|
HLog(@"Error reading contents of directory: %@", error.localizedDescription);
|
|
HLog(@"Error reading contents of directory: %@", error.localizedDescription);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ [_audioArr removeAllObjects];
|
|
BOOL isFirstType = YES;
|
|
BOOL isFirstType = YES;
|
|
|
|
|
|
for (NSString *fileName in fileList) {
|
|
for (NSString *fileName in fileList) {
|
|
@@ -242,6 +247,10 @@
|
|
|
|
|
|
if (isFirstType) {
|
|
if (isFirstType) {
|
|
model.showAllType = YES;
|
|
model.showAllType = YES;
|
|
|
|
+ isFirstType = NO;
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ model.showAllType = NO;
|
|
}
|
|
}
|
|
|
|
|
|
// 创建文件信息字典
|
|
// 创建文件信息字典
|
|
@@ -328,7 +337,8 @@
|
|
make.top.mas_equalTo(0);
|
|
make.top.mas_equalTo(0);
|
|
}];
|
|
}];
|
|
|
|
|
|
- [_recordingV beginRecordFun];
|
|
|
|
|
|
+ NSInteger index = _audioArr.count + 1;
|
|
|
|
+ [_recordingV beginRecordFunWith:index];
|
|
|
|
|
|
KWeakSelf
|
|
KWeakSelf
|
|
_recordingV.didClickRecordEndFun = ^{
|
|
_recordingV.didClickRecordEndFun = ^{
|
|
@@ -341,6 +351,9 @@
|
|
{
|
|
{
|
|
[_recordingV removeFromSuperview];
|
|
[_recordingV removeFromSuperview];
|
|
_recordingV = nil;
|
|
_recordingV = nil;
|
|
|
|
+
|
|
|
|
+ [self getRecordDataFun];
|
|
|
|
+ [self.tableView reloadData];
|
|
}
|
|
}
|
|
|
|
|
|
@end
|
|
@end
|