Post

Replies

Boosts

Views

Created

Hide Title Bar in SwiftUI App for mac
How can I hide the Title Bar in the new SwiftUI App Protocol? Since the AppDelegate.swift and SceneDelegate.swift protocols are gone, I cant follow this documentation anymore: https://developer.apple.com/documentation/uikit/mac_catalyst/removing_the_title_bar_in_your_mac_app_built_with_mac_catalyst I can't implement this code: class SceneDelegate: UIResponder, UIWindowSceneDelegate {     var window: UIWindow?         func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {         guard let windowScene = (scene as? UIWindowScene) else { return }         #if targetEnvironment(macCatalyst)         if let titlebar = windowScene.titlebar {             titlebar.titleVisibility = .hidden             titlebar.toolbar = nil         }         #endif     } } Hope it's still possible with the new AppProtocol.. Thank in advance
5
0
9.1k
Nov ’20