From feaa96c25859c79c5d2d24988cfca76e7fafd527 Mon Sep 17 00:00:00 2001 From: Nick Ager Date: Wed, 18 Sep 2019 12:47:45 +0100 Subject: [PATCH] temporary HUD hack to fix `Main Thread Checker` error * see pkluz/PKHUD#245 (with my comment) * see pkluz/PKHUD#251 - which documents an attempted fix in pull request pkluz/PKHUD/#252 * see another attempt which just conditionally enables the code - pkluz/PKHUD/#260 --- PKHUD/FrameView.swift | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/PKHUD/FrameView.swift b/PKHUD/FrameView.swift index 473048f..dffa10f 100644 --- a/PKHUD/FrameView.swift +++ b/PKHUD/FrameView.swift @@ -33,20 +33,20 @@ internal class FrameView: UIVisualEffectView { contentView.addSubview(content) - let offset = 20.0 - - let motionEffectsX = UIInterpolatingMotionEffect(keyPath: "center.x", type: .tiltAlongHorizontalAxis) - motionEffectsX.maximumRelativeValue = offset - motionEffectsX.minimumRelativeValue = -offset - - let motionEffectsY = UIInterpolatingMotionEffect(keyPath: "center.y", type: .tiltAlongVerticalAxis) - motionEffectsY.maximumRelativeValue = offset - motionEffectsY.minimumRelativeValue = -offset - - let group = UIMotionEffectGroup() - group.motionEffects = [motionEffectsX, motionEffectsY] - - addMotionEffect(group) +// let offset = 20.0 +// +// let motionEffectsX = UIInterpolatingMotionEffect(keyPath: "center.x", type: .tiltAlongHorizontalAxis) +// motionEffectsX.maximumRelativeValue = offset +// motionEffectsX.minimumRelativeValue = -offset +// +// let motionEffectsY = UIInterpolatingMotionEffect(keyPath: "center.y", type: .tiltAlongVerticalAxis) +// motionEffectsY.maximumRelativeValue = offset +// motionEffectsY.minimumRelativeValue = -offset +// +// let group = UIMotionEffectGroup() +// group.motionEffects = [motionEffectsX, motionEffectsY] +// +// addMotionEffect(group) } private var _content = UIView()