2022-01-02 19:41:04 +00:00
|
|
|
import Foundation
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
final class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
|
|
var orientationLock = UIInterfaceOrientationMask.all
|
|
|
|
|
|
|
|
private(set) static var instance: AppDelegate!
|
|
|
|
|
|
|
|
func application(_: UIApplication, supportedInterfaceOrientationsFor _: UIWindow?) -> UIInterfaceOrientationMask {
|
|
|
|
orientationLock
|
|
|
|
}
|
|
|
|
|
|
|
|
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { // swiftlint:disable:this discouraged_optional_collection
|
2022-05-20 19:53:17 +00:00
|
|
|
Self.instance = self
|
2022-06-21 22:18:16 +00:00
|
|
|
#if os(iOS)
|
|
|
|
UIViewController.swizzleHomeIndicatorProperty()
|
2022-06-28 19:11:28 +00:00
|
|
|
|
|
|
|
UITabBar.appearance().shadowImage = UIImage()
|
|
|
|
UITabBar.appearance().backgroundImage = UIImage()
|
|
|
|
UITabBar.appearance().isTranslucent = true
|
|
|
|
UITabBar.appearance().backgroundColor = .clear
|
2022-06-21 22:18:16 +00:00
|
|
|
#endif
|
2022-01-02 19:41:04 +00:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|