This API is called using wx.onDeviceOrientationChange(function listener).
Property | Type | Description |
value | string | The new screen orientation. landscape: Landscape mode with the HOME button on the right. landscapeReverse: Landscape mode with the HOME button on the left. |
This API is called using wx.offDeviceOrientationChange(function listener).
const listener = function (res) { console.log(res) }wx.onDeviceOrientationChange(listener)wx.offDeviceOrientationChange(listener) // Must pass the same function object used in onDeviceOrientationChange
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback