From 7cbe8f7fda0182867c7cd5d0ea53cdcc6ba6c85d Mon Sep 17 00:00:00 2001 From: Erik Poort Date: Fri, 14 Dec 2018 12:08:20 +0100 Subject: [PATCH] Call TweakAction closures in floating tweak window --- SwiftTweaks/FloatingTweakGroupViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SwiftTweaks/FloatingTweakGroupViewController.swift b/SwiftTweaks/FloatingTweakGroupViewController.swift index 4ffc162..772dc16 100644 --- a/SwiftTweaks/FloatingTweakGroupViewController.swift +++ b/SwiftTweaks/FloatingTweakGroupViewController.swift @@ -336,6 +336,9 @@ extension FloatingTweakGroupViewController: UITableViewDelegate { switch tweak.tweakViewDataType { case .action: self.hapticsPlayer.playNotificationSuccess() + if let actionTweak = tweak.tweak as? Tweak { + actionTweak.defaultValue.evaluateAllClosures() + } case .boolean, .cgFloat, .double, .integer, .string, .stringList, .uiColor: break }