-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppDelegate.swift
39 lines (33 loc) · 1.07 KB
/
AppDelegate.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import UIKit
import CoreLocation
class Window: UIWindow {
override func layoutSubviews() {
super.layoutSubviews()
#if AFFINITES_ENABLED
let tabBar = subviews.first { view in
return type(of: view) == UITabBar.self
}
if let tabBar = tabBar {
addSubview(tabBar)
}
#endif
}
}
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window = Window(frame: UIScreen.main.bounds)
#if targetEnvironment(macCatalyst)
let rootVC = BigScreenRootViewController()
window!.rootViewController = rootVC
window?.windowScene?.titlebar?.titleVisibility = .hidden
window?.windowScene?.titlebar?.toolbar = nil
#else
let rootVC = SmallScreenRootViewController()
window!.rootViewController = rootVC
#endif
window!.makeKeyAndVisible()
return true
}
}