Browse Source

添加加载 动画方法

jsonwang 3 years ago
parent
commit
855c1bbba9
1 changed files with 8 additions and 1 deletions
  1. 8 1
      BFFramework/Classes/Stuckpoint/View/PQStuckPointLoadingView.swift

+ 8 - 1
BFFramework/Classes/Stuckpoint/View/PQStuckPointLoadingView.swift

@@ -42,7 +42,14 @@ class PQStuckPointLoadingView: UIView {
         addLayout()
         
     }
-
+    func show() {
+        let data = try? Data(contentsOf: URL(fileURLWithPath: Bundle().BF_mainbundle().path(forResource: "stuckPoint_edit_loading", ofType: ".gif")!))
+        if data != nil {
+            PQPHAssetVideoParaseUtil.parasGIFImage(data: data!, isRenderingColor: UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)) { _, images, duration in
+                self.loadingView.displayGIF(data: nil, images: images, repeatCount: .max, duration: duration ?? 2)
+            }
+        }
+    }
     required init?(coder _: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }