12345678910111213141516171819202122232425262728293031323334 |
- import UIKit
- extension UIApplication {
-
- var isLandscape: Bool {
- if UIDevice.current.orientation.isValidInterfaceOrientation {
- return UIDevice.current.orientation.isLandscape
- } else {
- return windows.first?.windowScene?.interfaceOrientation.isLandscape ?? false
- }
- }
- }
|