Protocols

The following protocols are available globally.

  • Implement this protocol with your View to receive HTML click events.

    See more

    Declaration

    Swift

    public protocol ClickInputEventResponder
  • Implement this protocol with your View to receive HTML change events.

    See more

    Declaration

    Swift

    public protocol ChangeInputEventResponder
  • Represents a session of the WebSocket server you provide to a client browser.

    See more

    Declaration

    Swift

    public protocol WebSocketSession
  • A type that produces view previews in Xcode for SwiftUI. Currently has no effect with the SwiftWeb framework.

    See more

    Declaration

    Swift

    public protocol PreviewProvider
  • A type that represents part of your app’s user interface and provides modifiers that you use to configure views.

    You create custom views by declaring types that conform to the View protocol. Implement the required body computed property to provide the content for your custom view.

    See more

    Declaration

    Swift

    public protocol View : TypeErasedView
  • A modifier that you apply to a view or another view modifier, producing a different version of the original value.

    See more

    Declaration

    Swift

    public protocol ViewModifier
  • Implement this protocol with your View in order to customize its set of GrowingLayoutAxis.

    See more

    Declaration

    Swift

    public protocol GrowingAxesModifying
  • A named value produced by a view.

    A view with multiple children automatically combines its values for a given preference into a single value visible to its ancestors.

    See more

    Declaration

    Swift

    public protocol PreferenceKey : AnyPreferenceKey
  • Type-erased PreferenceKey.

    Declaration

    Swift

    public protocol AnyPreferenceKey
  • Type-erased View w.r.t. the Body associated type.

    See more

    Declaration

    Swift

    public protocol TypeErasedView
  • Implement this protocol with your View to define the elements to which a transformation of this view is applied.

    See more

    Declaration

    Swift

    public protocol CustomMappable
  • A custom specification for the appearance and interaction of a Picker.

    Declaration

    Swift

    public protocol PickerStyle