Date: 2024-11-29 00:09:00
Score: 1
Natty:
In iOS 18, we now have the onScrollTargetVisibilityChange
modifier. Simply attach this to the scroll view and use the scrollTargetLayout
modifier on the container of the items whose visibility you want to track.
ref: https://developer.apple.com/documentation/swiftui/view/onscrolltargetvisibilitychange(idtype:threshold:_:)
Reasons:
- Probably link only (1):
- Low length (0.5):
- Has code block (-0.5):
Posted by: Eric Yuan