david-swift 4937c36b3b Improve updating performance
And update docs reflecting the changes in the latest commits
2024-01-27 08:07:05 +01:00

1.0 KiB

STRUCT

ViewSwitcher

A picker used for indicating multiple views.

It normally controls a ViewStack (e.g. via switch statements).

Properties

selection

The selected element.

wide

Whether the wide style is used, that means the icons and titles are on the same line.

Methods

init(selection:)

Initialize a view switcher.

  • Parameter selection: The selected element.

container(modifiers:)

Get a view switcher's view storage.

  • Parameter modifiers: Modify views before being updated.
  • Returns: The view storage.

update(_:modifiers:updateProperties:)

Update a view switcher's view storage.

  • Parameters:
    • storage: The view storage.
    • modifiers: Modify views before being updated.
    • updateProperties: Whether to update properties.

updateSwitcher(switcher:)

Update a view switcher's style and selection.

  • Parameter switcher: The view switcher.

wideDesign(_:)

Set whether to use the wide design.

  • Parameter wide: Whether to use the wide design.
  • Returns: The view switcher.