summaryrefslogtreecommitdiffstats
path: root/scripts/examples/rotate.qs
blob: 4d35f495b10299cdac995414cf11f49c26b7e463 (plain)
1
2
3
4
5
6
7
8
9
10
var supported = simulator.supportedScreenOrientations()
print("supported screen orientations: " + supported)

for (var i in supported) {
    var orientation = supported[i]
    if (orientation != simulator.deviceOrientation()) {
        simulator.setDeviceOrientation(orientation, true)
        break
    }
}