|
@@ -7,6 +7,12 @@
|
|
|
|
|
|
#import "recordingView.h"
|
|
#import "recordingView.h"
|
|
#import "AudioRecorderManager.h"
|
|
#import "AudioRecorderManager.h"
|
|
|
|
+@interface recordingView ()
|
|
|
|
+@property(nonatomic,strong)UILabel * titlelabel;
|
|
|
|
+@property(nonatomic,strong)UILabel * timerlabel;
|
|
|
|
+@property(nonatomic,assign)NSInteger second;
|
|
|
|
+@property(nonatomic,strong)NSTimer * secondTimer;
|
|
|
|
+@end
|
|
|
|
|
|
@implementation recordingView
|
|
@implementation recordingView
|
|
|
|
|
|
@@ -67,13 +73,50 @@
|
|
}];
|
|
}];
|
|
|
|
|
|
|
|
|
|
|
|
+ //标题
|
|
|
|
+ _titlelabel = [[UILabel alloc] init];
|
|
|
|
+ [whiteBgView addSubview:_titlelabel];
|
|
|
|
+ _titlelabel.font = [UIFont systemFontOfSize:14.f];
|
|
|
|
+ _titlelabel.textAlignment = NSTextAlignmentCenter;
|
|
|
|
+ [_titlelabel setTextColor:HW0A132BColor];
|
|
|
|
+ [_titlelabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
+ make.left.mas_equalTo(12.0);
|
|
|
|
+ make.top.mas_equalTo(15.0);
|
|
|
|
+ make.height.mas_equalTo(20.0);
|
|
|
|
+ make.right.mas_equalTo(-12.f);
|
|
|
|
+ }];
|
|
|
|
+
|
|
|
|
+ _timerlabel = [[UILabel alloc] init];
|
|
|
|
+ [whiteBgView addSubview:_timerlabel];
|
|
|
|
+ _timerlabel.font = [UIFont systemFontOfSize:12.f];
|
|
|
|
+ _timerlabel.text = @"00:00:00";
|
|
|
|
+ _timerlabel.textAlignment = NSTextAlignmentCenter;
|
|
|
|
+ [_timerlabel setTextColor:[UIColor hwColor:@"979797"]];
|
|
|
|
+ [_timerlabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
+ make.left.mas_equalTo(12.0);
|
|
|
|
+ make.top.mas_equalTo(15.0);
|
|
|
|
+ make.height.mas_equalTo(20.0);
|
|
|
|
+ make.right.mas_equalTo(-12.f);
|
|
|
|
+ }];
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
#pragma mark 开始录音
|
|
#pragma mark 开始录音
|
|
- (void)beginRecordFunWith:(NSInteger)curIndex;
|
|
- (void)beginRecordFunWith:(NSInteger)curIndex;
|
|
{
|
|
{
|
|
- [AudioRecorderManager sharedManager].curRecordName = [[NSString alloc] initWithFormat:@"record%ld.m4a",curIndex];
|
|
|
|
|
|
+ NSString *curName = [[NSString alloc] initWithFormat:@"record%ld.m4a",curIndex];
|
|
|
|
+ _titlelabel.text = curName;
|
|
|
|
+ [AudioRecorderManager sharedManager].curRecordName = curName;
|
|
[[AudioRecorderManager sharedManager] startRecording];
|
|
[[AudioRecorderManager sharedManager] startRecording];
|
|
|
|
+
|
|
|
|
+ //_secondTimer in
|
|
|
|
+ _secondTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerChange) userInfo:nil repeats:YES];
|
|
|
|
+ [[NSRunLoop currentRunLoop] addTimer:_secondTimer forMode:NSRunLoopCommonModes];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#pragma mark 一秒一次的timer检测
|
|
|
|
+- (void)timerChange{
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
- (void)didClickButFun
|
|
- (void)didClickButFun
|