PIP area offset and padding

    PIP area offset and padding


    Article summary

    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


    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