Want iPhone screens on iPad

  1. 6 months ago

    Jeff T

    Jun 13 Pre-Release Testers Midlands of England, Europe

    Having designed a screen layout where things look right on most iPhones, I find the layout sparse and unpleasant on an iPad.
    I'd prefer the iPhone screen to be expanded to fit, which I expect means building for iPhone only.
    I removed the iPad screen, but nothing changed.
    How can I enforce a 'blown up' iphone layout on an iPad, so that buttons and icons are automatically scaled up?

  2. Dave S

    Jun 13 San Diego, California USA

    There used to be (maybe still is) a way to build an App for iPhone and an iPad would run it emulating the screen for what ever iPhone was closest in size.... I of course never did it with Xojo, but had in the past with Swift/Xcode.... but lately I have been using my own GUI builder to allow layouts that make best use of each specific screen, as you can do more on an iPhoneXR that an iPhone5s, so I tried to not limit myself by device "type", but more by device "size"

    In Xojo you may have to make two layouts one for an iPhone device, and another for an iPad.
    remember most iPhones are 16:9 aspect ratio, and most iPads and 4:3 (except iPad 11" which is neither 32:22)
    oh and the "X" series iPhones are closer to 32:15

  3. Jeff T

    Jun 13 Pre-Release Testers Midlands of England, Europe

    Pretty sure that if you build for iPhone only, an iPad will emulate it by doubling the size.
    I just cant find a way to build for iPhone only in Xojo.
    Sure I have done it before.

    Alternatively, I would have to set the size of graphic elements to be a percentage of the screen size.
    A bit of work, but could be done.
    However, I dont think font sizes can be done the same way, so I would have big buttons and tiny text

  4. Jason K

    Jun 13 Pre-Release Testers

    Having a phone screen layout is a horrible user experience and may not longer work at all since iPadOS is on the horizon. I would encourage you to take some time to properly design your UI to work on both iPhone and iPad, it takes time but is worth the investment. I'm not sure its possible to disable iPad support in Xojo since most developers don't want to limit the scope of their apps in this way.

    If you really want to have the whole layout scale there is code already on the forum that can do this. Read this thread: https://forum.xojo.com/53527-setting-iosbutton-widths-via-caption-char-count

  5. Jeff T

    Jun 14 Pre-Release Testers Midlands of England, Europe

    Having a phone screen layout is a horrible user experience and may not longer work at all since iPadOS is on the horizon

    Not when there are only a small number of user elements on the screen.
    Look at Calculator for a good example of 'just making the buttons bigger'
    Look at most games.

    Ho hum. Extra screens it is then.. I don't fancy relying on those OS calls to do the job.

  6. Douglas H

    Jun 14 Pre-Release Testers, Xojo Pro

    @Jeff T Not when there are only a small number of user elements on the screen.
    Look at Calculator for a good example of 'just making the buttons bigger'

    Instead of fixed sizes, assign all the edges based on percentages of the parent. Your elements will just resize to the available space regardless of device or orientation. In Xojo, that means using the Auto-Layout properties with a custom offset, and setting the "Relative to" and "Edge" properties as appropriate.

    Then you also have to deal with font sizing. One possible approach there (which I have not tried since I have done very little iOS in Xojo yet) is to assign a very large font then make it reduce to fit using the method @Jason K mentions in his thread response .

  7. Greg O

    Jun 14 Xojo Inc scout.galaxy.barn

    @Jeff T Having designed a screen layout where things look right on most iPhones, I find the layout sparse and unpleasant on an iPad.
    I'd prefer the iPhone screen to be expanded to fit, which I expect means building for iPhone only.
    I removed the iPad screen, but nothing changed.
    How can I enforce a 'blown up' iphone layout on an iPad, so that buttons and icons are automatically scaled up?

    You can do this today with an iOS project. Simply select the App class and set Default iPad Screen to None. When you run the app on an iPad it'll show the iPhone layout.

  8. Jeremie L

    Jun 14 Pre-Release Testers, Xojo Pro, XDC Speakers Europe (France) - getpackr.io

    Also remember that not including an iPad screen to your app will make it almost invisible when browsing the App Store on an iPad.

    All my apps are built in the way Douglas described it, using the same views for iPhone and iPad but everything is scaling nicely.
    Downloads from iPad account for 10-20% of all downloads, making the app hardly discoverable from an iPad when browsing the App Store might not be the best way to market your app.

  9. Dave S

    Jun 14 San Diego, California USA

    @Jeremie L Also remember that not including an iPad screen to your app will make it almost invisible when browsing the App Store on an iPad.

    All my apps are built in the way Douglas described it, using the same views for iPhone and iPad but everything is scaling nicely.
    Downloads from iPad account for 10-20% of all downloads, making the app hardly discoverable from an iPad when browsing the App Store might not be the best way to market your app.

    care to expand on this?
    it sounds like you are saying an "iPhone Only" app is nearly invisibile on the App Store?
    there are three build modes : Universal (iPhone or iPad), iPhone only and iPad only

    and each has their place depending on what the app is and does..... and I have never seen evidence that iPhone only is less visible
    since there are features the phones have that ipads don't (and vice-versa)

  10. Jeff T

    Jun 14 Pre-Release Testers Midlands of England, Europe
    Edited 6 months ago

    In Xojo, that means using the Auto-Layout properties with a custom offset, and setting the "Relative to" and "Edge" properties as appropriate.

    I have spent weeks screaming in frustration at auto layout.
    I've spent most of today duplicating the iPhone screens and making everything just .. larger.
    The end result will be much like running the iPhone app on an iPad.

    I am pretty sure all iPhone apps can be run on an iPad.. they just get doubled in size.
    But if the absence of an iPad screen stops an app showing up in the iPad Section of the store, this will sort it.
    In fact, I dont expect anybody to run this particular app on an iPad, but stranger things..

  11. Dave S

    Jun 14 San Diego, California USA

    @Jeff T I have spent weeks screaming in frustration at auto layout.

    which is why I design all my apps without the use of Autolayout... I get better results... can optimize the layout to the realestate etc.

    plus the best I can tell... Autolayout does not contain any method for altering the fontsize etc without relying on "autofit" which usually isn't the optimum method

  12. Art G

    Jun 14 Prescott AZ

    I almost always use a split view on the iPad, and I often use the iPhone view as the Master view of the split screen on iPad. Simple auto-layout rules handles the minor differences and the views look the same on either device. Then you have to think of what to put in the other view on the iPad...

or Sign Up to reply!