HomeiOS Developmentios - How do I discover scroll proportion of my ScrollView based...

ios – How do I discover scroll proportion of my ScrollView based mostly on scrollview’s consumer present scroll worth in Swift UI?


Drawback Assertion:
I’ve a display that comprises a scroll View. On high of my display I’ve a progress bar that exhibits the present proportion of how a lot I’ve scrolled the scroll view.

Description:
I’ve appeared for the answer for more often than not I’m discovering options the place I get the offset of the scroll view. however to calculate the present scrolled proportion I do want the scroll view top and content material top. as the peak of my content material will not be static and is dependent upon the the display measurement.
I adopted this for getting offset in scroll view.
https://saeedrz.medium.com/detect-scroll-position-in-swiftui-3d6e0d81fc6b

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments