SwiftUI and tvOS

Hi all!

Is there any sort of tutorials or documentation related to the tvOS specific things for SwiftUI?

E.g. how to get more control over tvOS Focus engine?

Also, is there "canBecomeFocused"-property analog for SwiftUI View and how to enable focusing for SwiftUI Image? Currently, I'm unable even make working parallax effect for my layered images.

The only Focus-related thing that I see are:


func onHover(perform: (Bool) -> Void) -> View

func focusable(Bool, onFocusChange: (Bool) -> Void) -> View


Is there something that I missed or SwiftUI currently not useful for tvOS production applications?

Post not yet marked as solved Up vote post of vitrukalex Down vote post of vitrukalex
604 views

Answers

Same question.

I don't see any methods to change focus behaviour or even just control focus in SwiftUI.


func focusable(Bool, onFocusChange: (Bool) -> Void) -> View is not working at all on Button on tvOS.
Focus in tvOS is mentioned in the What's New in SwiftUI video just posted today for WWDC 2020.