Instance Method


Tells the delegate when Picture in Picture is about to stop, to give your app an opportunity to restore its video playback user interface.


optional func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, restoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler: @escaping (Bool) -> Void)



The Picture in Picture controller to which you’ve assigned the delegate.


To allow the system to finish restoring your user interface, you must call the completion handler with a value of true.


Implement this method to reestablish your video playback user interface when PiP ends. The system calls this method no matter how PiP ends, whether it’s because the user ended playback, the user tapped the button to return ongoing video playback to your app, or the video finished playing on its own.

See Also