Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion Source/Device.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down