From 845e42825dda4b4347ef190ae1743f5119b19e8f Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Tue, 5 Feb 2019 08:38:56 +0000 Subject: [PATCH 1/2] Include presentation style in description --- Router/Destination.swift | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/Router/Destination.swift b/Router/Destination.swift index ab5b576..7295026 100644 --- a/Router/Destination.swift +++ b/Router/Destination.swift @@ -31,12 +31,11 @@ extension PresentationHint: CustomStringConvertible { switch self { case .navigate: return "navigate" - case .modal(let metrics): - let style = metrics.style != nil ? String(describing: metrics.style!) : "none" - return "modal - animated: \(metrics.animated), style: \(style)" - case .tab(let index): + case let .modal(metrics): + return "modal - animated: \(metrics.animated), style: \(metrics.style.styleDescription)" + case let .tab(index): return "tab - index: \(index)" - case .replaceTab(let index, let shouldSwitch): + case let .replaceTab(index, shouldSwitch): return "replaceTab - index: \(index), shouldSwitch: \(shouldSwitch)" } } @@ -79,3 +78,29 @@ extension PresentationHint: Equatable { } } } + +extension Optional where Wrapped == UIModalPresentationStyle { + var styleDescription: String { + guard case let .some(style) = self else { return "none" } + switch style { + case .fullScreen: + return "fullScreen" + case .pageSheet: + return "pageSheet" + case .formSheet: + return "formSheet" + case .currentContext: + return "currentContext" + case .custom: + return "custom" + case .overFullScreen: + return "overFullScreen" + case .overCurrentContext: + return "overCurrentContext" + case .popover: + return "popover" + case .none: + return "none" + } + } +} From 07ac5bfca19e366406f9f55c6ee0f947a4406172 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Tue, 5 Feb 2019 08:39:18 +0000 Subject: [PATCH 2/2] Update version number --- Router/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Router/Info.plist b/Router/Info.plist index 1007fd9..6db6fe4 100644 --- a/Router/Info.plist +++ b/Router/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.1.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass