WheelPickerStyle.swift 704 B

123456789101112131415161718192021
  1. /// A picker style that presents the options in a scrollable wheel.
  2. ///
  3. /// Only supported by UIKitBakcned, and only when running on iOS 14+ or
  4. /// Mac Catalyst 14+.
  5. public struct WheelPickerStyle: PickerStyle, _BuiltinPickerStyle {
  6. public nonisolated init() {}
  7. public func _asBackendPickerStyle<Backend: BaseAppBackend>(backend: Backend)
  8. -> BackendPickerStyle
  9. {
  10. .wheel
  11. }
  12. }
  13. extension PickerStyle where Self == WheelPickerStyle {
  14. /// A picker style that presents the options in a scrollable wheel.
  15. ///
  16. /// Only supported by UIKitBakcned, and only when running on iOS 14+ or
  17. /// Mac Catalyst 14+.
  18. public static nonisolated var wheel: Self { Self() }
  19. }