wenweiwei %!s(int64=3) %!d(string=hai) anos
pai
achega
1a46889fd8

+ 3 - 3
BFStuckPointKit/Classes/Controller/PQStuckPointPublicController.swift

@@ -300,7 +300,7 @@ class PQStuckPointPublicController: BFBaseViewController {
     // 手势提示
     lazy var pinView: UIImageView = {
         let pinView = UIImageView()
-        pinView.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: "editCoverPin", ofType: ".gif")!))
+        pinView.kf.setImage(with: URL(fileURLWithPath: Bundle.current(moduleName: "BFStuckPointKit",isAssets: false)!.path(forResource: "editCoverPin", ofType: ".gif")!))
         return pinView
     }()
 
@@ -1908,7 +1908,7 @@ extension PQStuckPointPublicController {
         var orgeBitRate = (editProjectModel?.sData?.videoMetaData?.videoWidth ?? 0) * (editProjectModel?.sData?.videoMetaData?.videoHeight ?? 0) * 3
 
         // 片尾的视频素材地址
-        let moveResPath = currentBundlePath()!.path(forResource: (editProjectModel?.sData?.videoMetaData?.videoWidth ?? 0) < (editProjectModel?.sData?.videoMetaData?.videoHeight ?? 0) ? "endMovieB" : "endMovieA", ofType: "mp4")
+        let moveResPath = Bundle.current(moduleName: "BFStuckPointKit",isAssets: false)?.path(forResource: (editProjectModel?.sData?.videoMetaData?.videoWidth ?? 0) < (editProjectModel?.sData?.videoMetaData?.videoHeight ?? 0) ? "endMovieB" : "endMovieA", ofType: "mp4")
         if moveResPath?.count ?? 0 == 0 {
             BFLog(message: "片尾的视频素材地址无效!!!")
             return
@@ -2012,7 +2012,7 @@ extension PQStuckPointPublicController {
             userNameSticker.materialPosition = userNamePostion
 
             // 4,音频
-            let soundResPath = currentBundlePath()!.path(forResource: "endMovieSound", ofType: "mp3")
+            let soundResPath = Bundle.current(moduleName: "BFStuckPointKit",isAssets: false)?.path(forResource: "endMovieSound", ofType: "mp3")
             let soundAsset = AVURLAsset(url: URL(fileURLWithPath: soundResPath ?? ""), options: nil)
             self?.endMovieExporter = PQCompositionExporter(asset: soundAsset, videoComposition: nil, audioMix: nil, filters: nil, stickers: [bgMovieInfo, avatarSticker, userNameSticker], animationTool: nil, exportURL: outPutMP4URL)
             self?.endMovieExporter.isEndMovie = true

+ 1 - 3
BFStuckPointKit/Classes/View/PQSelecteMusicView.swift

@@ -609,13 +609,11 @@ class PQSelectMusicCell: UICollectionViewCell {
             playImageView.isHidden = false
             imageMaskView.isHidden = false
             playImageView.image = nil
-            playImageView.kf.setImage(with: URL(fileURLWithPath: currentBundle()!.path(forResource: "stuckPoint_music_playing", ofType: ".gif")!))
-
+            playImageView.kf.setImage(with: URL(fileURLWithPath: Bundle.current(moduleName: "BFStuckPointKit",isAssets: false)!.path(forResource: "stuckPoint_music_playing", ofType: ".gif")!))
         } else if bgmData?.voiceStatue == .isPause {
             playImageView.isHidden = false
             imageMaskView.isHidden = false
             playImageView.image = UIImage.moduleImage(named: "stuckPoint_music_pause", moduleName: "BFStuckPointKit", isAssets: false)
-
         } else {
             playImageView.isHidden = true
             playImageView.image = nil

+ 2 - 2
BFStuckPointKit/Classes/View/PQStuckPointMusicContentCell.swift

@@ -136,7 +136,7 @@ class PQStuckPointMusicContentCell: UICollectionViewCell {
                         playImageView.image = UIImage.moduleImage(named: "loading", moduleName: "BFStuckPointKit", isAssets: false)
                         startLoadingAnimation()
                     } else {
-                        playImageView.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: "stuckPoint_music_playing", ofType: ".gif")!))
+                        playImageView.kf.setImage(with: URL(fileURLWithPath: Bundle.current(moduleName: "BFStuckPointKit",isAssets: false)!.path(forResource: "stuckPoint_music_playing", ofType: ".gif")!))
                     }
                     musicNameLab.move()
                 } else {
@@ -255,7 +255,7 @@ class PQStuckPointMusicContentCell: UICollectionViewCell {
     func stopLoadingAnimation() {
         playImageView.layer.removeAllAnimations()
         if (bgmData as? PQVoiceModel)?.isPlaying ?? false {
-            playImageView.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: "stuckPoint_music_playing", ofType: ".gif")!))
+            playImageView.kf.setImage(with: URL(fileURLWithPath: Bundle.current(moduleName: "BFStuckPointKit",isAssets: false)!.path(forResource: "stuckPoint_music_playing", ofType: ".gif")!))
         }
     }
 }