From 12f3686c0e0bfd96fb28aba800da3420bc8dcae5 Mon Sep 17 00:00:00 2001 From: Adrian Schoenig Date: Wed, 12 Apr 2023 13:25:03 +1000 Subject: [PATCH] Add completion handler to `toggleMapOverlays` --- Sources/TGCardViewController/TGCardViewController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/TGCardViewController/TGCardViewController.swift b/Sources/TGCardViewController/TGCardViewController.swift index 831e7e6..5d0af6b 100644 --- a/Sources/TGCardViewController/TGCardViewController.swift +++ b/Sources/TGCardViewController/TGCardViewController.swift @@ -1627,7 +1627,7 @@ extension TGCardViewController { extension TGCardViewController { - public func toggleMapOverlays(show: Bool, animated: Bool = true) { + public func toggleMapOverlays(show: Bool, animated: Bool = true, completion: ((Bool) -> Void)? = nil) { // Map buttons self.allowFloatingViews = show if show { @@ -1651,6 +1651,8 @@ extension TGCardViewController { } else { self.mapViewController.additionalSafeAreaInsets = .zero } + } completion: { finished in + completion?(finished) } }