2

For default mode, when user starts Picture-In-Picture, the little windows starts at the latest position (latest pip window closed position).

Is there a way to set starting position like: top-left, top-right, bottom-left, bottom-right?

4

1 回答 1

0

无法设置AVPictureInPictureController.

确实没有理由设置位置(它将位于其他应用程序之上,而不是您自己的应用程序之上),用户可以随时更改它的位置,不受您的控制。

AVPictureInPictureController 文档

如果应用程序以不受用户直接指示的方式调用 PiP,它将被 App Store 拒绝。

此外,也不建议创建以下子类AVPictureInPictureController

不要继承 AVPictureInPictureController。不支持覆盖此类的方法,并导致未定义的行为。

无论如何,创建此功能都需要使用私有 API,这是 Apple 的保证拒绝。

于 2016-02-15T02:10:31.797 回答