Remove nonsense Mac menus (#285)

This commit is contained in:
Davide De Rosa 2023-04-08 11:56:17 +02:00 committed by GitHub
parent 8f27690aca
commit 50b4806275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -27,7 +27,7 @@ import Foundation
import UIKit import UIKit
import PassepartoutLibrary import PassepartoutLibrary
class AppDelegate: NSObject, UIApplicationDelegate, ObservableObject { class AppDelegate: UIResponder, UIApplicationDelegate, ObservableObject {
private let mac = MacBundle.shared private let mac = MacBundle.shared
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
@ -46,4 +46,14 @@ class AppDelegate: NSObject, UIApplicationDelegate, ObservableObject {
sceneConfiguration.delegateClass = SceneDelegate.self sceneConfiguration.delegateClass = SceneDelegate.self
return sceneConfiguration 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)
}
} }