Commit d8bc51f3 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent 6a07d516
...@@ -230,6 +230,8 @@ ...@@ -230,6 +230,8 @@
A950F5B024F4E080007AB63E /* Mine.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Mine.storyboard; sourceTree = "<group>"; }; A950F5B024F4E080007AB63E /* Mine.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Mine.storyboard; sourceTree = "<group>"; };
A950F5B424F4E64A007AB63E /* UIView+CornerRadii.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+CornerRadii.h"; sourceTree = "<group>"; }; A950F5B424F4E64A007AB63E /* UIView+CornerRadii.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+CornerRadii.h"; sourceTree = "<group>"; };
A950F5B524F4E64A007AB63E /* UIView+CornerRadii.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CornerRadii.m"; sourceTree = "<group>"; }; A950F5B524F4E64A007AB63E /* UIView+CornerRadii.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CornerRadii.m"; sourceTree = "<group>"; };
A954DD9125222C4600C2DDB6 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
A954DD9225222C4600C2DDB6 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
A95A76832521D70F003B4E1C /* DDSoundWaveView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDSoundWaveView.h; sourceTree = "<group>"; }; A95A76832521D70F003B4E1C /* DDSoundWaveView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDSoundWaveView.h; sourceTree = "<group>"; };
A95A76842521D70F003B4E1C /* UIView+LayoutMethods.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+LayoutMethods.m"; sourceTree = "<group>"; }; A95A76842521D70F003B4E1C /* UIView+LayoutMethods.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+LayoutMethods.m"; sourceTree = "<group>"; };
A95A76852521D70F003B4E1C /* DDSoundWaveView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDSoundWaveView.m; sourceTree = "<group>"; }; A95A76852521D70F003B4E1C /* DDSoundWaveView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDSoundWaveView.m; sourceTree = "<group>"; };
...@@ -962,6 +964,7 @@ ...@@ -962,6 +964,7 @@
knownRegions = ( knownRegions = (
en, en,
Base, Base,
"zh-Hans",
); );
mainGroup = A95CDF5B24E0E8B50066DAE6; mainGroup = A95CDF5B24E0E8B50066DAE6;
productRefGroup = A95CDF6524E0E8B50066DAE6 /* Products */; productRefGroup = A95CDF6524E0E8B50066DAE6 /* Products */;
...@@ -1211,6 +1214,7 @@ ...@@ -1211,6 +1214,7 @@
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
A95CDF6E24E0E8B50066DAE6 /* Base */, A95CDF6E24E0E8B50066DAE6 /* Base */,
A954DD9125222C4600C2DDB6 /* zh-Hans */,
); );
name = Main.storyboard; name = Main.storyboard;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1219,6 +1223,7 @@ ...@@ -1219,6 +1223,7 @@
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
A95CDF7324E0E8B80066DAE6 /* Base */, A95CDF7324E0E8B80066DAE6 /* Base */,
A954DD9225222C4600C2DDB6 /* zh-Hans */,
); );
name = LaunchScreen.storyboard; name = LaunchScreen.storyboard;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1230,6 +1235,7 @@ ...@@ -1230,6 +1235,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
...@@ -1290,6 +1296,7 @@ ...@@ -1290,6 +1296,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
...@@ -1348,7 +1355,7 @@ ...@@ -1348,7 +1355,7 @@
CODE_SIGN_ENTITLEMENTS = "ShorthandMaster/速记大师.entitlements"; CODE_SIGN_ENTITLEMENTS = "ShorthandMaster/速记大师.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 8F4PP38DC3; DEVELOPMENT_TEAM = 8F4PP38DC3;
GCC_INPUT_FILETYPE = automatic; GCC_INPUT_FILETYPE = automatic;
...@@ -1363,7 +1370,7 @@ ...@@ -1363,7 +1370,7 @@
"$(PROJECT_DIR)/ShorthandMaster/Other/Lame", "$(PROJECT_DIR)/ShorthandMaster/Other/Lame",
"$(PROJECT_DIR)/ShorthandMaster/Other/lame", "$(PROJECT_DIR)/ShorthandMaster/Other/lame",
); );
MARKETING_VERSION = 1.0.0; MARKETING_VERSION = 1.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ShorthandMaster.www; PRODUCT_BUNDLE_IDENTIFIER = com.ShorthandMaster.www;
PRODUCT_NAME = "速记大师"; PRODUCT_NAME = "速记大师";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -1382,7 +1389,7 @@ ...@@ -1382,7 +1389,7 @@
CODE_SIGN_ENTITLEMENTS = "ShorthandMaster/速记大师.entitlements"; CODE_SIGN_ENTITLEMENTS = "ShorthandMaster/速记大师.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 8F4PP38DC3; DEVELOPMENT_TEAM = 8F4PP38DC3;
GCC_INPUT_FILETYPE = automatic; GCC_INPUT_FILETYPE = automatic;
...@@ -1397,7 +1404,7 @@ ...@@ -1397,7 +1404,7 @@
"$(PROJECT_DIR)/ShorthandMaster/Other/Lame", "$(PROJECT_DIR)/ShorthandMaster/Other/Lame",
"$(PROJECT_DIR)/ShorthandMaster/Other/lame", "$(PROJECT_DIR)/ShorthandMaster/Other/lame",
); );
MARKETING_VERSION = 1.0.0; MARKETING_VERSION = 1.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ShorthandMaster.www; PRODUCT_BUNDLE_IDENTIFIER = com.ShorthandMaster.www;
PRODUCT_NAME = "速记大师"; PRODUCT_NAME = "速记大师";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
......
...@@ -27,7 +27,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -27,7 +27,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
MobClick.event("app_start") MobClick.event("app_start")
SHUserAccountManager.shared.logCollection(with: .appStart) SHUserAccountManager.shared.logCollection(with: .appStart)
// IQKeyboardManager.shared.enable = true IQKeyboardManager.shared.enable = true
self.window = UIWindow(frame: UIScreen.main.bounds) self.window = UIWindow(frame: UIScreen.main.bounds)
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>NSPhotoLibraryUsageDescription</key>
<string></string>
<key>NSCameraUsageDescription</key>
<string></string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
...@@ -29,6 +25,8 @@ ...@@ -29,6 +25,8 @@
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
<true/> <true/>
</dict> </dict>
<key>NSCameraUsageDescription</key>
<string></string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>App需要您开启定位权限,命名您的文件名称</string> <string>App需要您开启定位权限,命名您的文件名称</string>
<key>NSLocationAlwaysUsageDescription</key> <key>NSLocationAlwaysUsageDescription</key>
...@@ -39,6 +37,8 @@ ...@@ -39,6 +37,8 @@
<string>App需要您开启定位权限,命名您的文件名称</string> <string>App需要您开启定位权限,命名您的文件名称</string>
<key>NSMicrophoneUsageDescription</key> <key>NSMicrophoneUsageDescription</key>
<string>App需要访问麦克风,进行录音并保存</string> <string>App需要访问麦克风,进行录音并保存</string>
<key>NSPhotoLibraryUsageDescription</key>
<string></string>
<key>NSSpeechRecognitionUsageDescription</key> <key>NSSpeechRecognitionUsageDescription</key>
<string>App需要您允许以使用语音识别进行语音转译</string> <string>App需要您允许以使用语音识别进行语音转译</string>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
......
...@@ -107,7 +107,7 @@ extension SHMineViewController:UITableViewDelegate, UITableViewDataSource{ ...@@ -107,7 +107,7 @@ extension SHMineViewController:UITableViewDelegate, UITableViewDataSource{
if indexPath.section == 0 { if indexPath.section == 0 {
cell?.detailTextLabel?.text = currentSortType cell?.detailTextLabel?.text = currentSortType
cell?.detailTextLabel?.font = UIFont.systemFont(ofSize: 12) cell?.detailTextLabel?.font = UIFont.systemFont(ofSize: 16)
} }
cell?.accessoryType = .disclosureIndicator cell?.accessoryType = .disclosureIndicator
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
NSString *type; NSString *type;
if (ary.count <= 0) { if (ary.count <= 0) {
[UIAlertController showAlertViewWithTitle:@"提示" Message:@"数据源不能为空" BtnTitles:@[@"确定"] ClickBtn:nil]; // [UIAlertController showAlertViewWithTitle:@"提示" Message:@"数据源不能为空" BtnTitles:@[@"确定"] ClickBtn:nil];
return sortDic; return sortDic;
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
NSString * type; NSString * type;
if(originalArray.count <= 0){ if(originalArray.count <= 0){
UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"数据源不能为空" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil]; UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"数据源不能为空" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
[alert show]; // [alert show];
return originalArray; return originalArray;
} }
else{ else{
......
...@@ -50,6 +50,9 @@ class SHRecordDetailsVC: SHBaseViewController { ...@@ -50,6 +50,9 @@ class SHRecordDetailsVC: SHBaseViewController {
tableView?.rowHeight = UITableView.automaticDimension tableView?.rowHeight = UITableView.automaticDimension
tableView?.separatorStyle = .none tableView?.separatorStyle = .none
self.view.layoutIfNeeded()
self.view.layoutSubviews()
bottomView?.frame = CGRect.init(x: -tableFooterView!.frame.width, y: 0, width: tableFooterView!.frame.width*2, height: tableFooterView!.frame.height) bottomView?.frame = CGRect.init(x: -tableFooterView!.frame.width, y: 0, width: tableFooterView!.frame.width*2, height: tableFooterView!.frame.height)
tableFooterAlertBgView?.addSubview(bottomView!) tableFooterAlertBgView?.addSubview(bottomView!)
......
...@@ -429,10 +429,11 @@ extension SHRecordListViewController { ...@@ -429,10 +429,11 @@ extension SHRecordListViewController {
@objc func addModel(){ @objc func addModel(){
let newFolder = SHRecordRenameAlertView.loadFromNibAndClass(SHRecordRenameAlertView.self)! let newFolder = SHRecordRenameAlertView.loadFromNibAndClass(SHRecordRenameAlertView.self)!
newFolder.placeHolder = "这是一个新的笔记本名称" newFolder.placeHolder = "笔记本名称"
newFolder.title = "新笔记本" newFolder.title = "新笔记本"
newFolder.frame = UIApplication.shared.keyWindow!.bounds newFolder.frame = self.view.window?.bounds ?? CGRect.zero
UIApplication.shared.keyWindow!.addSubview(newFolder) // self.view.addSubview(newFolder)
self.navigationController?.view.addSubview(newFolder)
newFolder.confirmCallBack = { newFolderStr in newFolder.confirmCallBack = { newFolderStr in
......
...@@ -103,7 +103,7 @@ class SHRecordMoveFileVC: SHBaseViewController { ...@@ -103,7 +103,7 @@ class SHRecordMoveFileVC: SHBaseViewController {
//MARK:添加新笔记 //MARK:添加新笔记
@objc func addModel(){ @objc func addModel(){
let newFolder = SHRecordRenameAlertView.loadFromNibAndClass(SHRecordRenameAlertView.self)! let newFolder = SHRecordRenameAlertView.loadFromNibAndClass(SHRecordRenameAlertView.self)!
newFolder.placeHolder = "这是一个新的笔记本名称" newFolder.placeHolder = "笔记本名称"
newFolder.title = "新笔记本" newFolder.title = "新笔记本"
newFolder.frame = UIApplication.shared.keyWindow!.bounds newFolder.frame = UIApplication.shared.keyWindow!.bounds
UIApplication.shared.keyWindow!.addSubview(newFolder) UIApplication.shared.keyWindow!.addSubview(newFolder)
......
...@@ -70,8 +70,10 @@ class SHRecordViewController: SHBaseViewController{ ...@@ -70,8 +70,10 @@ class SHRecordViewController: SHBaseViewController{
} }
@objc func backGroundAlive(){ @objc func backGroundAlive(){
if recorderManager.state == .start{
recorderManager.start() recorderManager.start()
} }
}
override func goback() { override func goback() {
super.goback() super.goback()
...@@ -123,10 +125,15 @@ class SHRecordViewController: SHBaseViewController{ ...@@ -123,10 +125,15 @@ class SHRecordViewController: SHBaseViewController{
return return
} }
// if let model = currentModel {
// self.removeCurrentRecored(model)
// }
self.recorderManager.stop() self.recorderManager.stop()
self.save = true self.save = true
self.saveContent() self.saveContent()
self.saveSuccessCallBack?(folderModel) self.saveSuccessCallBack?(folderModel)
self.timerInvalidate()
let export = SHRecordExportAlertView.loadFromNibAndClass(SHRecordExportAlertView.self)! let export = SHRecordExportAlertView.loadFromNibAndClass(SHRecordExportAlertView.self)!
export.frame = UIApplication.shared.keyWindow!.bounds export.frame = UIApplication.shared.keyWindow!.bounds
...@@ -158,35 +165,6 @@ class SHRecordViewController: SHBaseViewController{ ...@@ -158,35 +165,6 @@ class SHRecordViewController: SHBaseViewController{
} }
} }
@objc func userCilck(){
if currentTxt?.length == 0{
return
}
self.recorderManager.stop()
self.save = true
if let model = currentModel {
self.removeCurrentRecored(model)
}
saveContent()
if save == true {
self.currentTxt = ""
self.recorderBtn.setImage(UIImage.init(named: "record_start"), for: .normal)
self.recordTextView.attributedText = self.textView_text("")
self.configPathFile()
self.recorderBtn.isSelected = false
self.secondsLabel.text = "00:00:00"
self.seconds = 0
self.save = false
self.recorderManager.stop()
}
let mine = UIStoryboard.init(name: "Mine", bundle: nil).instantiateViewController(withIdentifier: "SHMineViewController") as! SHMineViewController
self.navigationController?.pushViewController(mine, animated: true)
}
@objc @IBAction func recordBtnClick(_ sender:UIButton){ @objc @IBAction func recordBtnClick(_ sender:UIButton){
if seconds >= non_member_limit_seconds { if seconds >= non_member_limit_seconds {
...@@ -285,9 +263,9 @@ class SHRecordViewController: SHBaseViewController{ ...@@ -285,9 +263,9 @@ class SHRecordViewController: SHBaseViewController{
func saveContent(){ func saveContent(){
if currentTxt?.length == 0 { // if currentTxt?.length == 0 {
return // return
} // }
let nowDate = Date() let nowDate = Date()
let model = SHRecordModel() let model = SHRecordModel()
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
import UIKit import UIKit
import IQKeyboardManagerSwift
class SHRecordRenameAlertView: UIView { class SHRecordRenameAlertView: UIView {
...@@ -42,9 +43,10 @@ class SHRecordRenameAlertView: UIView { ...@@ -42,9 +43,10 @@ class SHRecordRenameAlertView: UIView {
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.backgroundColor = UIColor.init(red: 0, green: 0, blue: 0, alpha: 0.3) self.backgroundColor = UIColor.init(red: 0, green: 0, blue: 0, alpha: 0.3)
bgView?.layer.cornerRadius = 8 bgView?.layer.cornerRadius = 8
self.textField?.becomeFirstResponder()
self.textField?.keyboardToolbar.doneBarButton.setTarget(self, action: #selector(self.doneButtonClicked(_:)))
} }
@objc @IBAction func cleanBtnClick(_ sender:UIButton){ @objc @IBAction func cleanBtnClick(_ sender:UIButton){
...@@ -62,5 +64,18 @@ class SHRecordRenameAlertView: UIView { ...@@ -62,5 +64,18 @@ class SHRecordRenameAlertView: UIView {
self.removeFromSuperview() self.removeFromSuperview()
} }
} }
@objc func doneButtonClicked(_ sender: Any) {
if let text = textField?.text, text.length > 0{
confirmCallBack?(textField?.text ?? "")
self.removeFromSuperview()
}else{
self.textField?.becomeFirstResponder()
}
}
deinit {
// IQKeyboardManager.shared.enable = false
}
} }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qte-rS-SOz"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qte-rS-SOz">
<rect key="frame" x="44" y="359.5" width="326" height="177"/> <rect key="frame" x="44" y="188.5" width="326" height="176.5"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="重命名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Yi-xr-CGL"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="重命名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Yi-xr-CGL">
<rect key="frame" x="135.5" y="16" width="55.5" height="21.5"/> <rect key="frame" x="135.5" y="16" width="55.5" height="21.5"/>
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<constraint firstItem="qte-rS-SOz" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" multiplier="295:375" id="2PD-LC-trJ"/> <constraint firstItem="qte-rS-SOz" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" multiplier="295:375" id="2PD-LC-trJ"/>
<constraint firstItem="qte-rS-SOz" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="CA5-u5-70k"/> <constraint firstItem="qte-rS-SOz" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="CA5-u5-70k"/>
<constraint firstItem="qte-rS-SOz" firstAttribute="width" secondItem="qte-rS-SOz" secondAttribute="height" multiplier="295:160" id="R7v-tq-gOF"/> <constraint firstItem="qte-rS-SOz" firstAttribute="width" secondItem="qte-rS-SOz" secondAttribute="height" multiplier="295:160" id="R7v-tq-gOF"/>
<constraint firstItem="qte-rS-SOz" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="nKY-Te-wSH"/> <constraint firstItem="qte-rS-SOz" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" multiplier="0.618" id="nKY-Te-wSH"/>
</constraints> </constraints>
<connections> <connections>
<outlet property="bgView" destination="qte-rS-SOz" id="DBx-na-7o1"/> <outlet property="bgView" destination="qte-rS-SOz" id="DBx-na-7o1"/>
......
...@@ -11,6 +11,7 @@ import AVFoundation ...@@ -11,6 +11,7 @@ import AVFoundation
import Speech import Speech
enum SHRecordState { enum SHRecordState {
case prepare
case start case start
case pause case pause
case stop case stop
...@@ -80,7 +81,7 @@ class SHAVAudioManager: NSObject { ...@@ -80,7 +81,7 @@ class SHAVAudioManager: NSObject {
var startTime: CFTimeInterval = CACurrentMediaTime() var startTime: CFTimeInterval = CACurrentMediaTime()
var recoderResiltCallBack:((String)->Void)? var recoderResiltCallBack:((String)->Void)?
var decibelsCallBack:((Float)->Void)? var decibelsCallBack:((Float)->Void)?
var state = SHRecordState.start var state = SHRecordState.prepare
private func configRecorder(){ private func configRecorder(){
...@@ -193,9 +194,7 @@ class SHAVAudioManager: NSObject { ...@@ -193,9 +194,7 @@ class SHAVAudioManager: NSObject {
} }
func start(){ func start(){
if audioEngine.isRunning {
return
}
self.state = SHRecordState.start self.state = SHRecordState.start
self.configRecorder() self.configRecorder()
self.configSpeechTask() self.configSpeechTask()
......
...@@ -20,6 +20,7 @@ class SHCloudManager: NSObject { ...@@ -20,6 +20,7 @@ class SHCloudManager: NSObject {
lazy var container = CKContainer.default() lazy var container = CKContainer.default()
lazy var dateBase = container.publicCloudDatabase lazy var dateBase = container.publicCloudDatabase
// lazy var dateBase = container.privateCloudDatabase
lazy var folderResults:[CKRecord] = [] lazy var folderResults:[CKRecord] = []
lazy var recordResults:[CKRecord] = [] lazy var recordResults:[CKRecord] = []
......
/* Class = "UILabel"; text = "速记大师"; ObjectID = "Zf1-FF-KGd"; */
"Zf1-FF-KGd.text" = "速记大师";
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