Przeglądaj źródła

我的-页面:loadingview remove时crash

huzhiqiang 3 lat temu
rodzic
commit
4a03600999

+ 2 - 2
BFFramework/Classes/Base/View/PQLoadingHUB.swift

@@ -120,8 +120,8 @@ public class PQLoadingHUB: NSObject {
 
     public func dismissHUB(superView: UIView) {
         DispatchQueue.main.async { [weak self] in
-            if superView.viewWithTag(self!.viewTag) != nil {
-                superView.viewWithTag(self!.viewTag)?.removeFromSuperview()
+            if let v = superView.viewWithTag(self?.viewTag ?? 999579) {
+                v.removeFromSuperview()
                 self?.isLoading = false
             }
         }

+ 2 - 2
BFFramework/Classes/PQGPUImage/Source/BasicOperation.swift

@@ -108,10 +108,10 @@ open class BasicOperation: ImageProcessingOperation {
             // add by ak 设置 timingStyle 到每一帧
             outputFramebuffer.timingStyle = framebuffer.timingStyle
 
-            let currTime1 = CMTimeGetSeconds(CMTime(value: framebuffer.timingStyle.timestamp!.value, timescale: framebuffer.timingStyle.timestamp!.timescale))
+//            let currTime1 = CMTimeGetSeconds(CMTime(value: framebuffer.timingStyle.timestamp!.value, timescale: framebuffer.timingStyle.timestamp!.timescale))
 //            BFLog(message: "baseicOperation  framebuffer 当前时间: \(currTime1)")
 
-            let currTime = CMTimeGetSeconds(CMTime(value: outputFramebuffer.timingStyle.timestamp!.value, timescale: outputFramebuffer.timingStyle.timestamp!.timescale))
+//            let currTime = CMTimeGetSeconds(CMTime(value: outputFramebuffer.timingStyle.timestamp!.value, timescale: outputFramebuffer.timingStyle.timestamp!.timescale))
 //            BFLog(message: "baseicOperation 当前时间: \(currTime)")
 
             updateTargetsWithFramebuffer(outputFramebuffer)

+ 1 - 1
BFFramework/Classes/PQGPUImage/Source/Pipeline.swift

@@ -72,7 +72,7 @@ public extension ImageSource {
     }
 
     func updateTargetsWithFramebuffer(_ framebuffer: Framebuffer) {
-        let currTime1 = CMTimeGetSeconds(CMTime(value: framebuffer.timingStyle.timestamp!.value, timescale: framebuffer.timingStyle.timestamp!.timescale))
+//        let currTime1 = CMTimeGetSeconds(CMTime(value: framebuffer.timingStyle.timestamp!.value, timescale: framebuffer.timingStyle.timestamp!.timescale))
 //        BFLog(message: "pipeline   framebuffer 当前时间: \(currTime1)")
 
         if DispatchQueue.getSpecific(key: sharedImageProcessingContext.dispatchQueueKey) != sharedImageProcessingContext.dispatchQueueKeyValue {