Commit c9b388a8 authored by zhangzhe's avatar zhangzhe

no message

parent 3a2189a1
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
CC13DB6A251C83E600835654 /* SHInputViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB69251C83E600835654 /* SHInputViewModel.swift */; }; CC13DB6A251C83E600835654 /* SHInputViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB69251C83E600835654 /* SHInputViewModel.swift */; };
CC13DB6F251C972600835654 /* SHInputModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB6E251C972600835654 /* SHInputModel.swift */; }; CC13DB6F251C972600835654 /* SHInputModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB6E251C972600835654 /* SHInputModel.swift */; };
CC13DB74251C9A2F00835654 /* SHInputTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB73251C9A2F00835654 /* SHInputTextView.swift */; }; CC13DB74251C9A2F00835654 /* SHInputTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB73251C9A2F00835654 /* SHInputTextView.swift */; };
CC13DB79251CA62800835654 /* SHImputAudioButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB78251CA62800835654 /* SHImputAudioButton.swift */; }; CC13DB79251CA62800835654 /* SHInputAudioButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB78251CA62800835654 /* SHInputAudioButton.swift */; };
CC29A704251C50520059BD5C /* SHInputController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A703251C50520059BD5C /* SHInputController.swift */; }; CC29A704251C50520059BD5C /* SHInputController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A703251C50520059BD5C /* SHInputController.swift */; };
CC29A709251C71AC0059BD5C /* SHSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A708251C71AC0059BD5C /* SHSwift.swift */; }; CC29A709251C71AC0059BD5C /* SHSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A708251C71AC0059BD5C /* SHSwift.swift */; };
CC29A716251C75210059BD5C /* SHInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A715251C75210059BD5C /* SHInputView.swift */; }; CC29A716251C75210059BD5C /* SHInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A715251C75210059BD5C /* SHInputView.swift */; };
...@@ -331,7 +331,7 @@ ...@@ -331,7 +331,7 @@
CC13DB69251C83E600835654 /* SHInputViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputViewModel.swift; sourceTree = "<group>"; }; CC13DB69251C83E600835654 /* SHInputViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputViewModel.swift; sourceTree = "<group>"; };
CC13DB6E251C972600835654 /* SHInputModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputModel.swift; sourceTree = "<group>"; }; CC13DB6E251C972600835654 /* SHInputModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputModel.swift; sourceTree = "<group>"; };
CC13DB73251C9A2F00835654 /* SHInputTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputTextView.swift; sourceTree = "<group>"; }; CC13DB73251C9A2F00835654 /* SHInputTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputTextView.swift; sourceTree = "<group>"; };
CC13DB78251CA62800835654 /* SHImputAudioButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHImputAudioButton.swift; sourceTree = "<group>"; }; CC13DB78251CA62800835654 /* SHInputAudioButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputAudioButton.swift; sourceTree = "<group>"; };
CC29A703251C50520059BD5C /* SHInputController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputController.swift; sourceTree = "<group>"; }; CC29A703251C50520059BD5C /* SHInputController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputController.swift; sourceTree = "<group>"; };
CC29A708251C71AC0059BD5C /* SHSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHSwift.swift; sourceTree = "<group>"; }; CC29A708251C71AC0059BD5C /* SHSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHSwift.swift; sourceTree = "<group>"; };
CC29A715251C75210059BD5C /* SHInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputView.swift; sourceTree = "<group>"; }; CC29A715251C75210059BD5C /* SHInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputView.swift; sourceTree = "<group>"; };
...@@ -827,7 +827,7 @@ ...@@ -827,7 +827,7 @@
CC29A715251C75210059BD5C /* SHInputView.swift */, CC29A715251C75210059BD5C /* SHInputView.swift */,
CC13DB73251C9A2F00835654 /* SHInputTextView.swift */, CC13DB73251C9A2F00835654 /* SHInputTextView.swift */,
CC29A71A251C790D0059BD5C /* SHInputBottomView.swift */, CC29A71A251C790D0059BD5C /* SHInputBottomView.swift */,
CC13DB78251CA62800835654 /* SHImputAudioButton.swift */, CC13DB78251CA62800835654 /* SHInputAudioButton.swift */,
); );
path = View; path = View;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1137,7 +1137,7 @@ ...@@ -1137,7 +1137,7 @@
A95CE03624E1729B0066DAE6 /* SHRecordWaveView.swift in Sources */, A95CE03624E1729B0066DAE6 /* SHRecordWaveView.swift in Sources */,
A950F5AA24F3727A007AB63E /* SHRecordListCell.swift in Sources */, A950F5AA24F3727A007AB63E /* SHRecordListCell.swift in Sources */,
A9A16C812519DDC400DE0FEE /* PopContainerView.swift in Sources */, A9A16C812519DDC400DE0FEE /* PopContainerView.swift in Sources */,
CC13DB79251CA62800835654 /* SHImputAudioButton.swift in Sources */, CC13DB79251CA62800835654 /* SHInputAudioButton.swift in Sources */,
A94DD56B24FDF29700B1B5A2 /* XBAudioConverterPlayer.m in Sources */, A94DD56B24FDF29700B1B5A2 /* XBAudioConverterPlayer.m in Sources */,
A94EE11D251B7E510066B490 /* SHRecordDetailsVC.swift in Sources */, A94EE11D251B7E510066B490 /* SHRecordDetailsVC.swift in Sources */,
A9A16C6E2519DD6900DE0FEE /* PinyinFormatter.m in Sources */, A9A16C6E2519DD6900DE0FEE /* PinyinFormatter.m in Sources */,
......
...@@ -590,7 +590,7 @@ extension SHInputController: UIImagePickerControllerDelegate, UINavigationContro ...@@ -590,7 +590,7 @@ extension SHInputController: UIImagePickerControllerDelegate, UINavigationContro
extension SHInputController extension SHInputController
{ {
// MARK: 点击添加录音按钮 // MARK: 点击添加录音按钮
@objc func didSelectedAddAudioButton(sender : SHImputAudioButton) @objc func didSelectedAddAudioButton(sender : SHInputAudioButton)
{ {
self.shInputView.bottomView.addAudioButton.isHidden = true self.shInputView.bottomView.addAudioButton.isHidden = true
self.shInputView.bottomView.pauseAudioButton.isHidden = false self.shInputView.bottomView.pauseAudioButton.isHidden = false
...@@ -610,7 +610,7 @@ extension SHInputController ...@@ -610,7 +610,7 @@ extension SHInputController
} }
// MARK: 点击暂停录音按钮 // MARK: 点击暂停录音按钮
@objc func didSelectedPauseAudioButton(sender : SHImputAudioButton) @objc func didSelectedPauseAudioButton(sender : SHInputAudioButton)
{ {
self.shInputView.bottomView.addAudioButton.isHidden = true self.shInputView.bottomView.addAudioButton.isHidden = true
self.shInputView.bottomView.pauseAudioButton.isHidden = true self.shInputView.bottomView.pauseAudioButton.isHidden = true
...@@ -627,7 +627,7 @@ extension SHInputController ...@@ -627,7 +627,7 @@ extension SHInputController
} }
// MARK: 点击继续录音按钮 // MARK: 点击继续录音按钮
@objc func didSelectedGoOnAudioButton(sender : SHImputAudioButton) @objc func didSelectedGoOnAudioButton(sender : SHInputAudioButton)
{ {
self.shInputView.bottomView.addAudioButton.isHidden = true self.shInputView.bottomView.addAudioButton.isHidden = true
self.shInputView.bottomView.pauseAudioButton.isHidden = false self.shInputView.bottomView.pauseAudioButton.isHidden = false
...@@ -644,7 +644,7 @@ extension SHInputController ...@@ -644,7 +644,7 @@ extension SHInputController
} }
// MARK: 点击结束录制按钮 // MARK: 点击结束录制按钮
@objc func didSelectedStopAudioButton(sender : SHImputAudioButton) @objc func didSelectedStopAudioButton(sender : SHInputAudioButton)
{ {
self.shInputView.bottomView.addAudioButton.isHidden = false self.shInputView.bottomView.addAudioButton.isHidden = false
self.shInputView.bottomView.pauseAudioButton.isHidden = true self.shInputView.bottomView.pauseAudioButton.isHidden = true
......
// //
// SHImputAudioButton.swift // SHInputAudioButton.swift
// ShorthandMaster // ShorthandMaster
// //
// Created by 张哲 on 2020/9/24. // Created by 张哲 on 2020/9/24.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
class SHImputAudioButton: UIButton { class SHInputAudioButton: UIButton {
// MARK: - property // MARK: - property
/// 背景 /// 背景
......
...@@ -16,17 +16,26 @@ class SHInputBottomView: UIView { ...@@ -16,17 +16,26 @@ class SHInputBottomView: UIView {
/// 选择图片按钮 /// 选择图片按钮
var imageButton : UIButton! var imageButton : UIButton!
/// 录音按钮背景 /// 录音按钮背景
var audioBgView : UIView! var audioBgView : UIView!
/// 录制时间背景
var audioTimeBgView : UIView!
/// 录制时间小红点
var audioTimePointView : UIView!
/// 录制时间
var audioTimeLabel : UIView!
/// 添加录音按钮 /// 添加录音按钮
var addAudioButton : SHImputAudioButton! var addAudioButton : SHInputAudioButton!
/// 暂停录音按钮 /// 暂停录音按钮
var pauseAudioButton : SHImputAudioButton! var pauseAudioButton : SHInputAudioButton!
/// 继续录音按钮 /// 继续录音按钮
var goOnAudioButton : SHImputAudioButton! var goOnAudioButton : SHInputAudioButton!
/// 结束录音按钮 /// 结束录音按钮
var stopAudioButton : SHImputAudioButton! var stopAudioButton : SHInputAudioButton!
/// 键盘按钮 /// 键盘按钮
var keyboardButton : UIButton! var keyboardButton : UIButton!
...@@ -68,8 +77,17 @@ class SHInputBottomView: UIView { ...@@ -68,8 +77,17 @@ class SHInputBottomView: UIView {
self.audioBgView = UIView() self.audioBgView = UIView()
self.bgView.addSubview(self.audioBgView) self.bgView.addSubview(self.audioBgView)
// 录制时间背景
self.audioTimeBgView = UIView()
self.audioTimeBgView.backgroundColor = UIColor(r: 241, g: 241, b: 241)
self.audioTimeBgView.layer.masksToBounds = true
self.bgView.addSubview(self.audioTimeBgView)
// 录制时间小红点
// 录制时间
// 添加录音按钮 // 添加录音按钮
self.addAudioButton = SHImputAudioButton(type: UIButton.ButtonType.custom) self.addAudioButton = SHInputAudioButton(type: UIButton.ButtonType.custom)
self.addAudioButton.layer.cornerRadius = 15 self.addAudioButton.layer.cornerRadius = 15
self.addAudioButton.backgroundColor = UIColor(r: 250, g: 219, b: 219) self.addAudioButton.backgroundColor = UIColor(r: 250, g: 219, b: 219)
self.addAudioButton.leftImageView.image = UIImage(named: "input_addAudio") self.addAudioButton.leftImageView.image = UIImage(named: "input_addAudio")
...@@ -78,7 +96,7 @@ class SHInputBottomView: UIView { ...@@ -78,7 +96,7 @@ class SHInputBottomView: UIView {
self.audioBgView.addSubview(self.addAudioButton) self.audioBgView.addSubview(self.addAudioButton)
// 暂停录音按钮 // 暂停录音按钮
self.pauseAudioButton = SHImputAudioButton(type: UIButton.ButtonType.custom) self.pauseAudioButton = SHInputAudioButton(type: UIButton.ButtonType.custom)
self.pauseAudioButton.layer.cornerRadius = 15 self.pauseAudioButton.layer.cornerRadius = 15
self.pauseAudioButton.backgroundColor = UIColor(r: 219, g: 231, b: 250) self.pauseAudioButton.backgroundColor = UIColor(r: 219, g: 231, b: 250)
self.pauseAudioButton.leftImageView.image = UIImage(named: "input_pause") self.pauseAudioButton.leftImageView.image = UIImage(named: "input_pause")
...@@ -88,7 +106,7 @@ class SHInputBottomView: UIView { ...@@ -88,7 +106,7 @@ class SHInputBottomView: UIView {
self.pauseAudioButton.isHidden = true self.pauseAudioButton.isHidden = true
// 继续录音按钮 // 继续录音按钮
self.goOnAudioButton = SHImputAudioButton(type: UIButton.ButtonType.custom) self.goOnAudioButton = SHInputAudioButton(type: UIButton.ButtonType.custom)
self.goOnAudioButton.layer.cornerRadius = 15 self.goOnAudioButton.layer.cornerRadius = 15
self.goOnAudioButton.backgroundColor = UIColor(r: 250, g: 234, b: 219) self.goOnAudioButton.backgroundColor = UIColor(r: 250, g: 234, b: 219)
self.goOnAudioButton.leftImageView.image = UIImage(named: "input_goOn") self.goOnAudioButton.leftImageView.image = UIImage(named: "input_goOn")
...@@ -98,7 +116,7 @@ class SHInputBottomView: UIView { ...@@ -98,7 +116,7 @@ class SHInputBottomView: UIView {
self.goOnAudioButton.isHidden = true self.goOnAudioButton.isHidden = true
// 结束录音按钮 // 结束录音按钮
self.stopAudioButton = SHImputAudioButton(type: UIButton.ButtonType.custom) self.stopAudioButton = SHInputAudioButton(type: UIButton.ButtonType.custom)
self.stopAudioButton.layer.cornerRadius = 15 self.stopAudioButton.layer.cornerRadius = 15
self.stopAudioButton.backgroundColor = UIColor(r: 250, g: 219, b: 219) self.stopAudioButton.backgroundColor = UIColor(r: 250, g: 219, b: 219)
self.stopAudioButton.leftImageView.image = UIImage(named: "input_stop") self.stopAudioButton.leftImageView.image = UIImage(named: "input_stop")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment