29 lines
923 B
Swift
29 lines
923 B
Swift
|
|
//
|
||
|
|
// SettingsSceneDelegate.swift
|
||
|
|
// SBrowser
|
||
|
|
//
|
||
|
|
// Copyright © 2021 Apple Inc. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
import UIKit
|
||
|
|
|
||
|
|
class SettingsSceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||
|
|
var window: UIWindow?
|
||
|
|
|
||
|
|
var settingsViewController: SettingsViewController?
|
||
|
|
|
||
|
|
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)
|
||
|
|
{
|
||
|
|
guard let windowScene = (scene as? UIWindowScene) else { return }
|
||
|
|
|
||
|
|
let window = UIWindow(windowScene: windowScene)
|
||
|
|
let settingsViewController = SettingsViewController(windowScene: windowScene)
|
||
|
|
self.settingsViewController = settingsViewController
|
||
|
|
window.rootViewController = settingsViewController
|
||
|
|
windowScene.sizeRestrictions?.maximumSize = CGSize(width: 760.0, height: 400.0)
|
||
|
|
|
||
|
|
window.makeKeyAndVisible()
|
||
|
|
self.window = window
|
||
|
|
}
|
||
|
|
}
|