Prevent orientation change in iOS Safari

前端 未结 9 1559
死守一世寂寞
死守一世寂寞 2020-11-28 02:56

Is it possible to avoid transition to landscape view in Safari for iOS when the device is rotated?

iOS Safari has the \"orentationchange\" event, I tried to intercep

9条回答
  •  囚心锁ツ
    2020-11-28 03:46

    There is no way to force a particular orientation in Mobile Safari; it'll always autorotate when the user rotates their device.

    Perhaps you can display something for unsupported orientations informing the user that the orientations aren't supported, and that they need to rotate the device back in order to use your web app.

提交回复
热议问题