Components

Partial Sheet(iOS)

A control that presents a view controller as a partial sheet.

Summary

On iOS the partial sheet presentation is implemented using the built-in UIKit component UIPresentationController.

viewController.modalPresentationStyle = .custom
viewController.transitioningDelegate = Presentation.partialSheet
viewController.partialSheetPresentationController?.partialSheetDelegate = self
present(viewController, animated: true)

Properties

isGrabberViewHidden

If false, the grabber at the top of the partial sheet is shown. The default value is true.

viewController.partialSheetPresentationController?.isGrabberViewHidden = false

isPanToDismissEnabled

If false, the partial sheet cannot be dismissed by panning it down. The default value is true.

viewController.partialSheetPresentationController?.isPanToDismissEnabled = false

Public API

See Apple documentation on UIPresentationController for the public API.