recordViewController.m 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. // recordViewController.m
  3. // 双子星云手机
  4. //
  5. // Created by xd h on 2025/3/28.
  6. //
  7. #import "recordViewController.h"
  8. #import "recordBottomView.h"
  9. @interface recordViewController ()
  10. @property(nonatomic,strong)NSMutableArray *audioArr;//音频数据
  11. @property(nonatomic,strong)recordBottomView *recordBottomV;//底部视图
  12. @end
  13. @implementation recordViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. // Do any additional setup after loading the view.
  17. _audioArr = [NSMutableArray new];
  18. [self drawAnyView];
  19. [self getRecordDataFun];
  20. }
  21. - (void)drawAnyView
  22. {
  23. [self.view setBackgroundColor:HWF5F7FAColor];
  24. self.navBarBGView.hidden = NO;
  25. [self.navigationBar setHidden:YES];
  26. [self.toolBar setHidden:YES];
  27. [self.titleLabel setText:NSLocalizedString(@"mine_record_title",nil)];
  28. //底部视图
  29. _recordBottomV = [[recordBottomView alloc] init];
  30. [self.view addSubview:_recordBottomV];
  31. [_recordBottomV mas_makeConstraints:^(MASConstraintMaker *make) {
  32. make.left.mas_equalTo(0.f);
  33. make.right.mas_equalTo(0.f);
  34. make.bottom.mas_equalTo(0.f);
  35. make.height.mas_equalTo(100.f + AdaptTabHeight);
  36. }];
  37. KWeakSelf
  38. _recordBottomV.didClickRecordFun = ^{
  39. [weakSelf didClickRecordFun];
  40. };
  41. }
  42. #pragma mark 读取本地数据
  43. - (void)getRecordDataFun
  44. {
  45. NSString *documentsDirectory = kSHPath_Record;
  46. NSFileManager *fileManager = [NSFileManager defaultManager];
  47. NSError *error = nil;
  48. NSArray *fileList = [fileManager contentsOfDirectoryAtPath:documentsDirectory error:&error];
  49. if (error) {
  50. HLog(@"Error reading contents of directory: %@", error.localizedDescription);
  51. }
  52. _audioArr = [NSMutableArray arrayWithArray:fileList];
  53. }
  54. #pragma mark 点击了录音
  55. - (void)didClickRecordFun
  56. {
  57. }
  58. @end