I have a section near the bottom of a ScrollView / LazyVStack. I want to show a popoverTip anchored to a button in that section, but only once the user has actually scrolled to it not on view load (otherwise the tip shows floating at the bottom of the screen).
I tried to use onAppear but it fires as soon as the view is inserted into the hierarchy which on a LazyVStack can happen slightly before the view is truly in the viewport.
I fell back to using onScrollVisibilityChange to write the @Parameter only when the section is actually visible:
.onScrollVisibilityChange { isVisible in
MyTip.sectionVisible = isVisible
}
This correctly gates visibility, but on some older devices I noticed that writing/reading @Parameter mid-scroll causes hitches.
Is there a recommended TipKit pattern for this use case: showing a popoverTip only when its anchor has been scrolled into view that doesn't require a reactive write during active scroll?
thanks