From 822eff1fe522683a8219227838a85b20a2da8cac Mon Sep 17 00:00:00 2001 From: redstrate <54911369+redstrate@users.noreply.github.com> Date: Sun, 24 May 2020 23:18:32 -0400 Subject: [PATCH] Don't show "Done" button on macOS for post detail views --- Gallery/PostDetailViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Gallery/PostDetailViewController.swift b/Gallery/PostDetailViewController.swift index 2f8c8b7..4893ef2 100644 --- a/Gallery/PostDetailViewController.swift +++ b/Gallery/PostDetailViewController.swift @@ -55,10 +55,15 @@ class PostDetailViewController: UIViewController, UIPopoverPresentationControlle imageView?.image = self.image if(isPopup) { + #if targetEnvironment(macCatalyst) + navigationItem.leftBarButtonItem = UIBarButtonItem(title: nil, style: .done, target: nil, action: nil) + #else navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Done", style: .plain, target: self, action: #selector(closePopup)) + + #endif } } - + #if !targetEnvironment(macCatalyst) updateWindowTitle() #endif