Add iOS option to lock portrait mode in browsing

This commit is contained in:
Arkadiusz Fal
2022-01-02 20:41:04 +01:00
parent aec7480353
commit d6e75295e1
7 changed files with 87 additions and 2 deletions

17
iOS/AppDelegate.swift Normal file
View File

@@ -0,0 +1,17 @@
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
AppDelegate.instance = self
return true
}
}