airtest.core.ios.rotation module

class RotationWatcher(iosHandle)[source]

Bases: object

RotationWatcher class

get_ready()[source]
teardown()[source]
start()[source]

Start the RotationWatcher daemon thread

Returns:

None

reg_callback(ow_callback)[source]
Parameters:

ow_callback

Returns:

get_rotation()[source]
class XYTransformer[source]

Bases: object

transform the coordinates (x, y) by orientation (upright <–> original)

static up_2_ori(tuple_xy, tuple_wh, orientation)[source]

Transform the coordinates upright –> original

Parameters:
  • tuple_xy – coordinates (x, y)

  • tuple_wh – current screen width and height

  • orientation – orientation

Returns:

transformed coordinates (x, y)

static ori_2_up(tuple_xy, tuple_wh, orientation)[source]

Transform the coordinates original –> upright

Parameters:
  • tuple_xy – coordinates (x, y)

  • tuple_wh – current screen width and height

  • orientation – orientation

Returns:

transformed coordinates (x, y)