I have a detent set in my VC, as a swip-panel on another ViewController (anotherVC) and in certain situations I want to freeze \ disable it from moving up and down...
func viewDidLoad() {
if let sheet = anotherVC.sheetPresentationController {
sheet.detents = [.medium(), .large()]
sheet.delegate = self
sheet.prefersScrollingExpandsWhenScrolledToEdge = false
sheet.prefersGrabberVisible = true
self.present(anotherVC, animated: true)
}
}
HOW DO I DISABLE THE DETENT FROM MOVING (up and down)?