PreviewControllerDelegate
@objc
public protocol PreviewControllerDelegate
Set this delegate if you want to make changes to the PreviewController view layout
using the size of the media before or after it has appeared.
-
Called before the
PreviewControllerhas displayed the media. Use this time to handle any additional layout for the view.Declaration
Swift
func previewControllerWillDisplayMedia(_ previewController: PreviewController, withSize size: CGSize)Parameters
previewControllerThe controller responsible for calling this method.
sizeThe actual size of the media. This is not the size in points of the media on the screen.
-
Called after the
PreviewControllerhas displayed the media.Declaration
Swift
func previewControllerDidDisplayMedia(_ previewController: PreviewController, withSize size: CGSize)Parameters
previewControllerThe controller responsible for calling this method.
sizeThe actual size of the media. This is not the size in points of the media on the screen.
View on GitHub
PreviewControllerDelegate Protocol Reference