Skip to content

How to set the next step of the click SpotlightBackground and SpotlightShape? #3

Description

@Kejiasir

Hey, thank you for open-sourcing such an excellent framework, which helped me achieve the effect I wanted. During use, I hope to switch to the next spotlight by clicking on the background or highlighted view, but it seems that there is no API support.

Can you provide a var nextAction: (() -> ())? { get set } property in the FlowChunk protocol to set the switch to the next spotlight?

Just like this, add a click event to the custom background:

var spotlightBackground: SpotlightBackground {
        .custom {
            Color.black.opacity(0.85)
                .ignoresSafeArea()
                .onTapGesture {
                    // next()
                }
                .anyView()
        }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions