PIP area offset and padding
- Print
PIP area offset and padding
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
In the PIP state within the app, you can specify the device screen offset to limit the area where the PIP can move, and specify padding for the PIP to prevent it from being too close to other areas.
The user navigates to the location in the app where they want the PIP to appear. You can limit the movable area of PIP so that it does not cover essential buttons or menus within the app.
Set the device offfset for PIP not to be moved
You can set the area where PIP can move by specifying the device screen offset in the PIP state within the app.
@objc static func setPictureInPictureFloatingOffset(offset: UIEdgeInsets) -> Bool
API Reference: setPictureInPictureFloatingOffset
Set padding for PIP
In the PIP state within the app, you can set padding on the PIP to prevent it from being too close to other areas.
@objc static func setPictureInPicturePadding(padding: UIEdgeInsets) -> Bool
API Reference: setPictureInPicturePadding(padding: UIEdgeInsets)