Sheet detents on Storyboard in Interface Builder in Xcode 13?

I have a storyboard segue that I'm using to show a ViewController as a Form Sheet.

I just watched the "Customize and resize sheets in UIKit" session and would like to know if I can set the form detent to medium in the storyboard in interface builder, or is it only from code as done in the video.

Also, does the same apply to .prefersEdgeAttachedInCompactHeight ?

Thanks

Answered by Frameworks Engineer in 678448022

Currently customizing the sheet instance can only be done from code. However, you can still use a popover, page sheet, or form sheet segue in the Storyboard editor, and in prepareForSegue: get the segue.destinationViewController.sheetPresentationController or segue.destinationViewController.popoverPresentationController.adaptiveSheetPresentationController to customize it.

Accepted Answer

Currently customizing the sheet instance can only be done from code. However, you can still use a popover, page sheet, or form sheet segue in the Storyboard editor, and in prepareForSegue: get the segue.destinationViewController.sheetPresentationController or segue.destinationViewController.popoverPresentationController.adaptiveSheetPresentationController to customize it.

Sheet detents on Storyboard in Interface Builder in Xcode 13?
 
 
Q