Skip to content

Default splitter #35

@aehlke

Description

@aehlke

I believe these splitter specs are reasonably close to the iOS system default:

bar color: Color.secondary.opacity(colorScheme == .dark ? 0.7 : 0.5)
bar thickness: 5
bar invisible thickness (but also as padding, not just an unclipped ZStack): I'm not sure but the default has some padding typically of approximately 16 or so on either side, could measure this
Shape: Capsule rather than RoundedRectangle

On macOS I believe it's simply a Divider() by default, with some tolerance on either side.

Secondly, there's no precedence for split views on iOS. Even iPad splitters are static and unmovable Divider()s. So I recommend (if you wanted to make this view fully native feeling out of the box) having something that behaves more like a sheet/popover on iOS, at least in "compact" mode, such as that it has rounded corners at one end, or perhaps even in fact using the new presentationDetent APIs with the very new API for allowing interaction with an undimmed background. However that's less flexible than this currently so some visual stand-in can work.

It's trivial at least to have a groupbox for a view, and a clear background so that the divider floats between rounded groupbox containers. That would feel native on iOS and not require library changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions