|
@@ -19,6 +19,7 @@ import ObjectMapper
|
|
|
import Photos
|
|
|
import RealmSwift
|
|
|
import UIKit
|
|
|
+import LMJHorizontalScrollText
|
|
|
|
|
|
class PQStuckPointEditerController: BFBaseViewController {
|
|
|
// 是否导出视频成功
|
|
@@ -488,38 +489,38 @@ class PQStuckPointEditerController: BFBaseViewController {
|
|
|
}()
|
|
|
|
|
|
/// 音乐标题
|
|
|
- lazy var musicNameView: UIView = {
|
|
|
- let musicNameView = UIView()
|
|
|
- musicNameView.addSubview(musicNameLab)
|
|
|
- let nameWidth: CGFloat = musicNameLab.frame.width + (25 + cDefaultMargin * 3)
|
|
|
- musicNameView.frame = CGRect(x: (view.frame.width - nameWidth) / 2, y: cDevice_iPhoneStatusBarHei + (cDevice_iPhoneNavBarHei - cDefaultMargin * 3) / 2, width: nameWidth, height: cDefaultMargin * 3)
|
|
|
-// musicNameView.backgroundColor = UIColor.hexColor(hexadecimal: "#333333")
|
|
|
- musicNameView.addCorner(corner: musicNameView.frame.height / 2)
|
|
|
- let musicImageView = UIImageView()
|
|
|
- musicImageView.tintColor = BFConfig.shared.styleTitleColor
|
|
|
- musicImageView.image = UIImage.moduleImage(named: "stuckPoint_reCreate_music", moduleName: "BFFramework", isAssets: false)?.withRenderingMode(.alwaysTemplate)
|
|
|
- musicImageView.frame = CGRect(x: musicNameView.frame.height / 2 - 5, y: (musicNameView.frame.height - 22) / 2, width: 22, height: 22)
|
|
|
- musicNameView.addSubview(musicImageView)
|
|
|
- musicNameLab.frame.origin.x = musicImageView.frame.maxX + 5
|
|
|
- return musicNameView
|
|
|
- }()
|
|
|
+// lazy var musicNameView: UIView = {
|
|
|
+// let musicNameView = UIView()
|
|
|
+// musicNameView.addSubview(musicNameLab)
|
|
|
+// let nameWidth: CGFloat = musicNameLab.frame.width + (25 + cDefaultMargin * 3)
|
|
|
+// musicNameView.frame = CGRect(x: (view.frame.width - nameWidth) / 2, y: cDevice_iPhoneStatusBarHei + (cDevice_iPhoneNavBarHei - cDefaultMargin * 3) / 2, width: nameWidth, height: cDefaultMargin * 3)
|
|
|
+//// musicNameView.backgroundColor = UIColor.hexColor(hexadecimal: "#333333")
|
|
|
+// musicNameView.addCorner(corner: musicNameView.frame.height / 2)
|
|
|
+// let musicImageView = UIImageView()
|
|
|
+// musicImageView.tintColor = BFConfig.shared.styleTitleColor
|
|
|
+// musicImageView.image = UIImage.moduleImage(named: "stuckPoint_reCreate_music", moduleName: "BFFramework", isAssets: false)?.withRenderingMode(.alwaysTemplate)
|
|
|
+// musicImageView.frame = CGRect(x: musicNameView.frame.height / 2 - 5, y: (musicNameView.frame.height - 22) / 2, width: 22, height: 22)
|
|
|
+// musicNameView.addSubview(musicImageView)
|
|
|
+// musicNameLab.frame.origin.x = musicImageView.frame.maxX + 5
|
|
|
+// return musicNameView
|
|
|
+// }()
|
|
|
|
|
|
/// 音乐歌曲名称
|
|
|
- lazy var musicNameLab: LMJHorizontalScrollText = {
|
|
|
- let nameWidth: CGFloat = sizeWithText(text: "\(stuckPointMusicData?.musicName ?? "")", font: UIFont.systemFont(ofSize: 13), size: CGSize(width: view.frame.width - ((cDefaultMargin * 6 + 16 * 2) * 2) - (25 + cDefaultMargin * 3), height: cDefaultMargin * 3)).width
|
|
|
- let musicNameLab = LMJHorizontalScrollText(frame: CGRect(x: 0, y: 0, width: nameWidth < cDefaultMargin * 4 ? cDefaultMargin * 4 : nameWidth, height: cDefaultMargin * 3))
|
|
|
- musicNameLab.textColor = BFConfig.shared.styleTitleColor
|
|
|
- musicNameLab.textFont = UIFont.systemFont(ofSize: 13)
|
|
|
- musicNameLab.speed = 0.03
|
|
|
- musicNameLab.moveDirection = LMJTextScrollMoveLeft
|
|
|
- musicNameLab.moveMode = LMJTextScrollContinuous
|
|
|
- if nameWidth < cDefaultMargin * 4 {
|
|
|
- musicNameLab.text = " \(stuckPointMusicData?.musicName ?? "") "
|
|
|
- } else {
|
|
|
- musicNameLab.text = " \(stuckPointMusicData?.musicName ?? "") "
|
|
|
- }
|
|
|
- return musicNameLab
|
|
|
- }()
|
|
|
+// lazy var musicNameLab: LMJHorizontalScrollText = {
|
|
|
+// let nameWidth: CGFloat = sizeWithText(text: "\(stuckPointMusicData?.musicName ?? "")", font: UIFont.systemFont(ofSize: 13), size: CGSize(width: view.frame.width - ((cDefaultMargin * 6 + 16 * 2) * 2) - (25 + cDefaultMargin * 3), height: cDefaultMargin * 3)).width
|
|
|
+// let musicNameLab = LMJHorizontalScrollText(frame: CGRect(x: 0, y: 0, width: nameWidth < cDefaultMargin * 4 ? cDefaultMargin * 4 : nameWidth, height: cDefaultMargin * 3))
|
|
|
+// musicNameLab.textColor = BFConfig.shared.styleTitleColor
|
|
|
+// musicNameLab.textFont = UIFont.systemFont(ofSize: 13)
|
|
|
+// musicNameLab.speed = 0.03
|
|
|
+// musicNameLab.moveDirection = LMJTextScrollMoveLeft
|
|
|
+// musicNameLab.moveMode = LMJTextScrollContinuous
|
|
|
+// if nameWidth < cDefaultMargin * 4 {
|
|
|
+// musicNameLab.text = " \(stuckPointMusicData?.musicName ?? "") "
|
|
|
+// } else {
|
|
|
+// musicNameLab.text = " \(stuckPointMusicData?.musicName ?? "") "
|
|
|
+// }
|
|
|
+// return musicNameLab
|
|
|
+// }()
|
|
|
|
|
|
/// 同步进度显示
|
|
|
lazy var synchroMarskView: PQStuckPointLoadingView = {
|
|
@@ -566,11 +567,11 @@ class PQStuckPointEditerController: BFBaseViewController {
|
|
|
// 3,更新音乐标题UI
|
|
|
let nameWidth: CGFloat = sizeWithText(text: "\(stuckPointMusicData?.musicName ?? "")", font: UIFont.systemFont(ofSize: 13), size: CGSize(width: view.frame.width - ((cDefaultMargin * 6 + 16 * 2) * 2) - (25 + cDefaultMargin * 3), height: cDefaultMargin * 3)).width
|
|
|
|
|
|
- if nameWidth < cDefaultMargin * 4 {
|
|
|
- musicNameLab.text = " \(stuckPointMusicData?.musicName ?? "") "
|
|
|
- } else {
|
|
|
- musicNameLab.text = " \(stuckPointMusicData?.musicName ?? "") "
|
|
|
- }
|
|
|
+// if nameWidth < cDefaultMargin * 4 {
|
|
|
+// musicNameLab.text = " \(stuckPointMusicData?.musicName ?? "") "
|
|
|
+// } else {
|
|
|
+// musicNameLab.text = " \(stuckPointMusicData?.musicName ?? "") "
|
|
|
+// }
|
|
|
|
|
|
// 更新一下节奏的 UI
|
|
|
sustomSwitchView.selectOneBtn(Index: stuckPointMusicData?.speed ?? 2)
|
|
@@ -726,7 +727,7 @@ class PQStuckPointEditerController: BFBaseViewController {
|
|
|
DispatchQueue.main.async {
|
|
|
UIApplication.shared.isIdleTimerDisabled = true
|
|
|
}
|
|
|
- musicNameLab.move()
|
|
|
+// musicNameLab.move()
|
|
|
|
|
|
PQNotification.addObserver(self, selector: #selector(enterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
|
|
|
PQNotification.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
|
|
@@ -743,7 +744,7 @@ class PQStuckPointEditerController: BFBaseViewController {
|
|
|
DispatchQueue.main.async {
|
|
|
UIApplication.shared.isIdleTimerDisabled = false
|
|
|
}
|
|
|
- musicNameLab.stop()
|
|
|
+// musicNameLab.stop()
|
|
|
playerView.stop()
|
|
|
|
|
|
musicEditBGView.pausePlayer()
|
|
@@ -756,7 +757,7 @@ class PQStuckPointEditerController: BFBaseViewController {
|
|
|
super.viewDidLoad()
|
|
|
leftButton(image: nil, tintColor: BFConfig.shared.styleTitleColor)
|
|
|
navHeadImageView?.addSubview(nextBtn)
|
|
|
- navHeadImageView?.addSubview(musicNameView)
|
|
|
+// navHeadImageView?.addSubview(musicNameView)
|
|
|
|
|
|
// 添加子视图
|
|
|
addSubViews()
|
|
@@ -1186,7 +1187,7 @@ class PQStuckPointEditerController: BFBaseViewController {
|
|
|
}
|
|
|
|
|
|
deinit {
|
|
|
- musicNameLab.stop()
|
|
|
+// musicNameLab.stop()
|
|
|
// playerView.pause()
|
|
|
// 取消所有的导出
|
|
|
PQSingletoMemoryUtil.shared.allExportSession.forEach { _, exportSession in
|