[ios] screen area bigger than device layout area

i’m trying to do the ios tutorial in 2025 1.1
i create the project, and land on the screen design.
the first thing i notice is that the screen area is bigger than the device layout area.
when i start laying out the controls, if i switch to the device layout, i can see that the design is cropped. if i run the simulator, the objects are moved, and cropped.

The Layouts don’t render correctly.

The Screens aren’t perfect but render better.

Everything in the simulator should work fine, unless you haven’t done the control constraints correctly. For your Table1, the constraints should be something like:

Top: TaskField.Bottom
Left: Parent.Left
Right: Parent.Right
Bottom: BottomLayoutGuide.Top + StandardGap

as you can see, the field and the button don’t render where i put them.
in a previous attempt, the controls overlapped, when they rendered, too.
so, how do you do layouts so that they look the way you would expect them to, or is that not possible?

Don’t bother about iPhoneLayout showing overlapping controls.
Currently, Xojo doesn’t render iPhoneLayout and iPadLayout correctly (only in the IDE) when the referenced screen uses a different size.

What’s important is what you see on the MobileScreen and in the simulator.

1 Like

I assume there is a bug report on this.
It does make it more difficult to make layouts, if this is an issue, obviously.

FWIW, Xojo can’t render it correctly because their built in custom constraint system only supports the most basic parts of auto layout, but iOS uses the full system.

I did a webinar in 2023 that talks about it and offers a more robust constraint system for use in Xojo apps.

1 Like

I personally only use the Layouts to specify the starting screen(s) when the app launches. I never look at them again.

The current layout is dynamic and depends on code like Show and Close to push and pop screens on the stack and ParentSplitView on an iPad to replace a screen.

I don’t care to see parent and detail views simultaneously on an iPad. I just work on each screen by itself. In the case of an iPhone, the screen IS the layout.

apologies, i’m a xojo noob. i didn’t mean making a layout, i meant laying out a screen.
i laid the controls out on a screen (screen1), but they are clearly constrained and moved when they are rendered.

When they are rendered in the iPhoneLayout ?
That’s not an issue. Just a minor display bug in Xojo. You can safely ignore it.

When they are rendered on the simulator?
Then it means your constraints aren’t set correctly.

2 Likes