From 50b4806275263ffaa017028fc047dd83f515fb5a Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 8 Apr 2023 11:56:17 +0200 Subject: [PATCH] Remove nonsense Mac menus (#285) --- Passepartout/App/AppDelegate.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Passepartout/App/AppDelegate.swift b/Passepartout/App/AppDelegate.swift index e1dcb4d4..5f9e3597 100644 --- a/Passepartout/App/AppDelegate.swift +++ b/Passepartout/App/AppDelegate.swift @@ -27,7 +27,7 @@ import Foundation import UIKit import PassepartoutLibrary -class AppDelegate: NSObject, UIApplicationDelegate, ObservableObject { +class AppDelegate: UIResponder, UIApplicationDelegate, ObservableObject { private let mac = MacBundle.shared func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { @@ -46,4 +46,14 @@ class AppDelegate: NSObject, UIApplicationDelegate, ObservableObject { sceneConfiguration.delegateClass = SceneDelegate.self return sceneConfiguration } + + override func buildMenu(with builder: UIMenuBuilder) { + super.buildMenu(with: builder) + builder.remove(menu: .file) + builder.remove(menu: .services) + builder.remove(menu: .format) + builder.remove(menu: .toolbar) + builder.remove(menu: .view) + builder.remove(menu: .help) + } }