setScreenOrientation
setScreenOrientation
このフォームが開いている間、画面の向きを固定します。
パラメータ
orientation(string|string[]): 許可する向きのトークン、またはトークンの配列
許可されるトークン:
'portrait'— 縦(portraitUp + portraitDown)'landscape'— 横(landscapeLeft + landscapeRight)'portraitUp'— 縦・正方向'portraitDown'— 縦・逆方向'landscapeLeft'— 横・左回転'landscapeRight'— 横・右回転'auto'または空の配列[]— 固定を解除
戻り値: なし(void)
説明
このフォームがアクティブな間、画面の向きを指定した向きに制限します。フォームが閉じられるとき(戻る操作やスライドバックを含む)、向きの制限は自動的にauto(解除)へ戻ります。
備考
モバイル(Android / iOS)でのみ有効です。デスクトップでは無視されます。
Example
// 가로 모드로 고정
$form.setScreenOrientation("landscape");
// 세로 정방향만 허용
$form.setScreenOrientation("portraitUp");
// 복수 방향 허용
$form.setScreenOrientation(["portraitUp", "landscapeLeft"]);
// 방향 잠금 해제
$form.setScreenOrientation("auto");