Interactive dismiss of view controller with scroll view

Hi, I'm having a hard time with interactively dismissing (swiping down) a view controller that it not nested in a UINavigationController and that has a ScrollView. Instead of swiping down, the scrollview just scrolls.

When I have the view controller nested in a navigation controller, then the system somehow sees that the scroll view is scrolled to the top, and allows the user to pull down the whole view controller.

What is the navigation controller doing here, what I need to re-implement in my view controller?

Thanks for any hints!