Get device current orientation (App Extension)

后端 未结 10 1476
执笔经年
执笔经年 2020-12-09 10:02

How to get device current orientation in an App Extension, I have tried below two methods but no success.

  1. It always return UIDeviceOrientationUnknown

    <
10条回答
  •  死守一世寂寞
    2020-12-09 10:43

    You could take a look at this library and its forks. It uses CoreMotion to detect the device orientation so it may work on App Extension's restricted environment.

提交回复
热议问题