SwiftUI scrolling is restricted to certain part

24 views Asked by At

I want to zoom a video and also scroll after zooming in. But once I zoom in it only allows me to zoom according to the scale of my pinch gesture

@objc private func pinch(gesture: UIPinchGestureRecognizer) {
    switch gesture.state {
    case .began:
        isPinching = true
    case .changed, .ended:
        if gesture.scale <= minScale {
            scale = minScale
        } else if gesture.scale >= maxScale {
            scale = maxScale
        } else {
            scale = gesture.scale
        }
        scaleChange(scale)
    case .cancelled, .failed:
        isPinching = false
        scale = 1.0
    default:
        break
    }
}
0

There are 0 answers