airtest.core.ios.rotation module

class RotationWatcher(iosHandle)[源代码]

基类:object

RotationWatcher class

get_ready()[源代码]
teardown()[源代码]
start()[源代码]

Start the RotationWatcher daemon thread

返回:

None

reg_callback(ow_callback)[源代码]
参数:

ow_callback

Returns:

get_rotation()[源代码]
class XYTransformer[源代码]

基类:object

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

static up_2_ori(tuple_xy, tuple_wh, orientation)[源代码]

Transform the coordinates upright –> original

参数:
  • tuple_xy – coordinates (x, y)

  • tuple_wh – current screen width and height

  • orientation – orientation

返回:

transformed coordinates (x, y)

static ori_2_up(tuple_xy, tuple_wh, orientation)[源代码]

Transform the coordinates original –> upright

参数:
  • tuple_xy – coordinates (x, y)

  • tuple_wh – current screen width and height

  • orientation – orientation

返回:

transformed coordinates (x, y)