Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Kejiasir opened this issue Jan 7, 2025 · 0 comments

Comments

@Kejiasir
Copy link

Kejiasir commented Jan 7, 2025

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()
        }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant