App runs only in landscape mode

  1. 6 months ago

    Michel B

    Jun 15 Pre-Release Testers, Xojo Pro

    I am sure that has been asked before, but I could not locate that in the forum.

    How do I set up an app so it runs only in landscape mode ?

    TIA

  2. Jeff T

    Jun 15 Pre-Release Testers Midlands of England, Europe

    In your project, click on iPadScreen and iPhoneScreen
    In the inspector, there are 4 on/off sliders to set which orientations are supported
    (Xojo 2019, not sure about earlier)

    If you dont have them, create a info.plist file, drag that into your project, and have it contain the right orientations.

    Heres my portrait only section:

    <key>UISupportedInterfaceOrientations</key>
    <array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    </array>
  3. Michel B

    Jun 16 Pre-Release Testers, Xojo Pro

    Great. Thank you Jeff.

    I am working with 2019R1.1 at the moment.

  4. Dave S

    Jun 16 San Diego, California USA

    Side note. Portrait Upside down, does not work on all devices.... especially the "X" series... it does works on all iPads

  5. Michel B

    Jun 16 Pre-Release Testers, Xojo Pro

    I will be fine, then :D

or Sign Up to reply!