Skip to content

Instantly share code, notes, and snippets.

@douglashill
Created October 9, 2020 18:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglashill/25a37282bc0c4dfc6aab92649a621812 to your computer and use it in GitHub Desktop.
Save douglashill/25a37282bc0c4dfc6aab92649a621812 to your computer and use it in GitHub Desktop.
Trivial Catalyst test app to see if `primaryBackgroundStyle = .sidebar` works to get a translucent blurry sidebar on Big Sur
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
}
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
private var _window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
let windowScene = scene as! UIWindowScene
let window = UIWindow(windowScene: windowScene)
_window = window
let splitView = UISplitViewController()
splitView.primaryBackgroundStyle = .sidebar
splitView.viewControllers = [
UIViewController(),
UIViewController(),
]
window.rootViewController = splitView
window.makeKeyAndVisible()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment