You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first thing I wanted to do with this View was drag on one of the images that was outside the View's frame. (The JT3DScrollView has clipsToBounds set to false, so the previous and next — and maybe others — show outside the View proper.)
The way to do this is to embed the JT3DScrollView in another view. Make the enclosing view a custom subclass of UIView and add this and only this method:
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if self.point(inside: point, with: nil) {
return subviews.first
} else {
return super.hitTest(point, with: event)
}
}
Now drags in the enclosing view will be passed to the enclosed JT3DScrollView. Have fun! And thanks JT for such a clean implementation.
The text was updated successfully, but these errors were encountered:
The first thing I wanted to do with this View was drag on one of the images that was outside the View's frame. (The
JT3DScrollView
hasclipsToBounds
set to false, so the previous and next — and maybe others — show outside the View proper.)The way to do this is to embed the
JT3DScrollView
in another view. Make the enclosing view a custom subclass ofUIView
and add this and only this method:Now drags in the enclosing view will be passed to the enclosed
JT3DScrollView
. Have fun! And thanks JT for such a clean implementation.The text was updated successfully, but these errors were encountered: