diff --git a/Source/Device.generated.swift b/Source/Device.generated.swift index 620c200..7920a39 100644 --- a/Source/Device.generated.swift +++ b/Source/Device.generated.swift @@ -1900,17 +1900,21 @@ extension Device { This enum describes the state of the orientation. - Landscape: The device is in Landscape Orientation - Portrait: The device is in Portrait Orientation + - Unknown: The device orientation is unknown. */ public enum Orientation { case landscape case portrait + case unknown } public var orientation: Orientation { if UIDevice.current.orientation.isLandscape { return .landscape - } else { + } else if UIDevice.current.orientation.isPortrait { return .portrait + } else { + return .unknown } } } diff --git a/Source/Device.swift.gyb b/Source/Device.swift.gyb index 5a90ee5..392310d 100644 --- a/Source/Device.swift.gyb +++ b/Source/Device.swift.gyb @@ -1180,17 +1180,21 @@ extension Device { This enum describes the state of the orientation. - Landscape: The device is in Landscape Orientation - Portrait: The device is in Portrait Orientation + - Unknown: The device orientation is unknown. */ public enum Orientation { case landscape case portrait + case unknown } public var orientation: Orientation { if UIDevice.current.orientation.isLandscape { return .landscape - } else { + } else if UIDevice.current.orientation.isPortrait { return .portrait + } else { + return .unknown } } }