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
PreviewController
has displayed the media. Use this time to handle any additional layout for the view.Declaration
Swift
func previewControllerWillDisplayMedia(_ previewController: PreviewController, withSize size: CGSize)
Parameters
previewController
The controller responsible for calling this method.
size
The actual size of the media. This is not the size in points of the media on the screen.
-
Called after the
PreviewController
has displayed the media.Declaration
Swift
func previewControllerDidDisplayMedia(_ previewController: PreviewController, withSize size: CGSize)
Parameters
previewController
The controller responsible for calling this method.
size
The actual size of the media. This is not the size in points of the media on the screen.