I guess I should have mentioned that this approach will not work touch enabled views. How would the system know which view you meant your gesture for? This is the same reason swiping over a tableview doesn't work. I suppose one approach would be to look for touch handlers within mainview, and then if the splitview decides the touch is not a swipe, it would call the mainview touch class. So you would be allowed to implement maybe touch_moved for vertical swipes, and touch_ended, touch_began would be delayed.
There is a splitview method show_detail and hide_detail and toggle_detail which let you hook this into other ui elements, like the menu button, or custom gestures within your main/detail view. So if we are willing to do without swipe to dismiss and instead have a close button, or implement within the custom views, this becomes very straightforward.
Alternatively, if we wish to dedicate a small area at the border or in the title bar for swiping, this could work. I updated the repo with an attempt at this approach. The gray color could be changed or not there at all. this implementation was a bit messy, but it shows the idea at least. I also gave you access to the mainview and detilview in the constructor, and the initial state.
The intention here was that one would write a separate NavigationView type class with optional top and bottom menu bars, which you would set as the splitview's mainview, and/or detailview. There it would make sense to implement a custom swipe action which could be hooked into the splitview. Alternatively, one could add this splitview as a subview to another view, for instance if you wanted the sliding container to only be a small portion of the view.
Note for changing the main or detail view, you simply set the attribute to point to the new View, and the SplitView class takes care or removing the old one, and adding the new as a subview, as well as (in the scrollview version) adding a splitview attribute to the main and detail views so you can more easily relate main and detail views ( i.e from the mainview you could write self.splitview.detailview to find the detailview).