1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- //
- // recordViewController.m
- // 双子星云手机
- //
- // Created by xd h on 2025/3/28.
- //
- #import "recordViewController.h"
- #import "recordBottomView.h"
- @interface recordViewController ()
- @property(nonatomic,strong)NSMutableArray *audioArr;//音频数据
- @property(nonatomic,strong)recordBottomView *recordBottomV;//底部视图
- @end
- @implementation recordViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
-
- _audioArr = [NSMutableArray new];
- [self drawAnyView];
- [self getRecordDataFun];
- }
- - (void)drawAnyView
- {
- [self.view setBackgroundColor:HWF5F7FAColor];
- self.navBarBGView.hidden = NO;
- [self.navigationBar setHidden:YES];
- [self.toolBar setHidden:YES];
- [self.titleLabel setText:NSLocalizedString(@"mine_record_title",nil)];
-
- //底部视图
- _recordBottomV = [[recordBottomView alloc] init];
- [self.view addSubview:_recordBottomV];
- [_recordBottomV mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(0.f);
- make.right.mas_equalTo(0.f);
- make.bottom.mas_equalTo(0.f);
- make.height.mas_equalTo(100.f + AdaptTabHeight);
- }];
-
- KWeakSelf
- _recordBottomV.didClickRecordFun = ^{
- [weakSelf didClickRecordFun];
- };
- }
- #pragma mark 读取本地数据
- - (void)getRecordDataFun
- {
- NSString *documentsDirectory = kSHPath_Record;
- NSFileManager *fileManager = [NSFileManager defaultManager];
-
- NSError *error = nil;
- NSArray *fileList = [fileManager contentsOfDirectoryAtPath:documentsDirectory error:&error];
-
- if (error) {
- HLog(@"Error reading contents of directory: %@", error.localizedDescription);
- }
-
- _audioArr = [NSMutableArray arrayWithArray:fileList];
- }
- #pragma mark 点击了录音
- - (void)didClickRecordFun
- {
-
- }
- @end
|