tvOS play/pause gesture and non-av views

I have a two-view app where the main view is a procedural animation and a secondary view controls settings for the animation. I want to use Play/Pause to toggle between the views, but can't figure out how to do this.

Ideally the main view does not have any visible control and the whole screen can be dedicated to the animation view. Attaching onPlayPauseCommand to the main view does not work. I've also tried managing focus using onFocus without success.

I'm open to other ways to toggle between the main and settings views, it's just that Play/Pause seems the most intuitive.

Accepted Reply

Solved my problem. I needed to add focusable:

        MyView()
                .focusable()
                .onPlayPauseCommand {...}

Replies

Solved my problem. I needed to add focusable:

        MyView()
                .focusable()
                .onPlayPauseCommand {...}