I am no expert at coordinate systems. I am kind of aware I can use its enclosingScrollView but don't know the details.
Any suggestions would be appreciated.
I am no expert at coordinate systems. I am kind of aware I can use its enclosingScrollView but don't know the details.
Any suggestions would be appreciated.
I have not tested, but I would try to read the scroll position and check if it is at the maximum.
Get details here: https://saeedrz.medium.com/detect-scroll-position-in-swiftui-3d6e0d81fc6b#:~:text=To%20detect%20the%20scroll%20position,to%20a%20given%20coordinate%20system.
At last, I found the answer myself, again. The answer lies in NSScroller.floatValue which inherited from NSControl.
let shouldDelegate = {
if let scroller = scrollView.verticalScroller {
return scroller.isHidden || scroller.floatValue == 0 || scroller.floatValue == 1.0
}
return true
}()