IphoneX

Has anyone tried to deal with the new iPhoneX in Xojo yet?
For that matter has iOS for Xojo caught up to XCode9?

Have been trying to find what the “accepted” HIG is for dealing with the new “software bar” that appears at the bottom (both in Port and Land orientation).
If you insure all controls etc do not overlap that control you lose a chunk of display… not “too terrible” in Port mode, but significant in Land mode

The “ears” on iPhoneX are another interesting “feature” but thats another conversation.

I don’t think it’s possible to check Xojo with an iPhone X yet.

[quote]Apple
iPhone X
Pre-order 10.27 - Available 11.3
[/quote]

I realize the physical device is not available yet…
but it is already in Xcode9 and the latest iOS simulator package

Xojo doesn’t support XCode 9 yet.

[quote=351533:@Dave S]Have been trying to find what the “accepted” HIG is for dealing with the new “software bar” that appears at the bottom (both in Port and Land orientation).
If you insure all controls etc do not overlap that control you lose a chunk of display… not “too terrible” in Port mode, but significant in Land mode[/quote]
I don’t have the link handy, but I recall seeing one somewhere along the twitterverse that said Apple expects you to not do anything special with the shape. We are supposed to not to hide the fact that the bar is there.

But you have to be careful… if a control overlaps that space, (like a button), then you can’t tap the button without activatiing that bar, and they DO say to NOT deactivate the bar except in certain apps like a movie viewer

IMHO that ‘special’ area should be off limits. It should also use a background color to match the phone, rather than whatever a developer feels is fit. Just my 2¢

my main question would be… how would you define autolayout constraints to avoid that area… seeing as far as I know, AL isn’t device dependent (that being the whole idea behind AL in the first place)

I have two iOS apps developed in XCode and from what I see, the UI is just stretched to fit the enlarged screen. I would assume that if your autolayout works for iPhone 7 and 7 Plus, it would do the same for the iPhone X.

My concern would be more on how to compensate for the front camera and sensors groove when the app is set to Hide the Status Bar.

I have some apps in Xcode/Swift (not using Autolayout)… but you can’t cover the “software bar” (per Apple)… so the question remains… if you do use AL… how would you make that happen on iPhoneX, but NOT on any other device

And yes, the “ears” create a similar problem, but since a normal “status bar” has the clock right where the cut-out is

the iPhone6,7 and 8 all have the same “width” as the iPhoneX (375 pixels), with the 6,7 and 8 being @2x and the X being @3x
meaning you lose around 30pixels trying to avoid the “software bar” manually

AutoLayout IS device dependent.
The “margins” are different depending on the device:

Human Interface Guidelines - iPhone X

I have read that article… yet it doesn’t indicate any “specifications” as to the size of the “margins” and “safety areas”

Of course it doesn’t - as they may change depending on device and iOS version. That’s what AutoLayout is for :slight_smile:

I think you could get the values like this: topLayoutGuide (and similar: bottomLayoutGuide)

For iOS 11 and newer (if you build using Xcode 9 and link against the iOS 11 framework): safeAreaLayoutGuide

Just remember that “Content Insets” (of UIScrollViews) behave differently depending if your App is linked against the iOS 10 or iOS 11 framework…
Refer to the documentation: contentInset, adjustedContentInset, contentInsetAdjustmentBehavior

https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/

[quote]Most apps that use standard, system-provided UI elements like navigation bars, tables, and collections automatically adapt to the device’s new form factor.

For apps with custom layouts, supporting iPhone X should also be relatively easy, especially if your app uses Auto Layout and adheres to safe area and margin layout guides.[/quote]

Actually it does… SafeAreaInsets … (however available only in iOS11, which doesn’t matter because all devices that support less than iOS11, the values would be 0 anyways)