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. This method is called no matter how PiP ends, whether it is 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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software