LoginSignup
4
4

More than 5 years have passed since last update.

【ionic】デバイスの向きに合わせてアプリの向きを変更する

Last updated at Posted at 2016-06-12

ionicでアプリを作成した初期状態では、デバイスの向きでアプリ向きは変更されず、固定的になっています。デバイスの向きに合わせてアプリの向きを変更させるには、config.xmlに以下の行を追加します。

■iOSの場合

config.xml
<platform name="ios">
<preference name="Orientation" value="all" />
</platform>

■Andoroidの場合

config.xml
<platform name="android">
<preference name="Orientation" value="all" />
</platform>

■参考URL
- Device Rotation

※(動作確認はしていませんが)上記の設定はcordovaでも有効です。ionicでの動作確認は1.7.15で行いました。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4