mirror of
https://github.com/yattee/yattee.git
synced 2024-11-14 10:08:23 +00:00
28 lines
999 B
Swift
28 lines
999 B
Swift
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
|
|
Self.instance = self
|
|
#if os(iOS)
|
|
UIViewController.swizzleHomeIndicatorProperty()
|
|
|
|
UITabBar.appearance().shadowImage = UIImage()
|
|
UITabBar.appearance().backgroundImage = UIImage()
|
|
UITabBar.appearance().isTranslucent = true
|
|
UITabBar.appearance().backgroundColor = .clear
|
|
|
|
OrientationTracker.shared.startDeviceOrientationTracking()
|
|
#endif
|
|
return true
|
|
}
|
|
}
|