Orientation.swift 455 B

1234567891011121314151617
  1. /// The orientation of a view (usually in reference to a stack view).
  2. public enum Orientation: Sendable {
  3. /// The horizontal orientation.
  4. case horizontal
  5. /// The vertical orientation.
  6. case vertical
  7. /// The orientation perpendicular to this one.
  8. var perpendicular: Orientation {
  9. switch self {
  10. case .horizontal:
  11. .vertical
  12. case .vertical:
  13. .horizontal
  14. }
  15. }
  16. }