Probably in the vast majority of apps there are only two orientations: Portrait and Landscape.
I think this would be useful: Being able to set auto-layout properties for portrait and also set them for landscape (imagine a popup menu or segmented control to indicate the orientation). One could then arrange things as needed for each orientation. Behind the scenes Xojo applies the appropriate rules you set up as users change the way they hold the device.
Thoughts? If this makes sense to others, I’ll post it as a suggestion in Feedback.
The thing is this does not account for the wide variations in device sizes that occurs now. The admittedly complex auto layout that Apple defines allows you to auto size for many different scenarios beyond just orientation.
Gone are the days of just a couple of phone or tablet screen sizes.
Granted there are lots of sizes, but I bet at least 80% of developers’ need would be covered by this. Especially since one can specify things as percents.
Your suggestion makes sense but it might make the auto-layout selection UI even more complicated than it already is.
I don’t think it would be much more complicated. Assume for a moment we only want to support Portrait, Landscape, or Both. Just above the box where all the current layout controls are entered is a segmented control. You pick the one you want, and layout away. Even better, it could detect the Portrait/Landscape option in the IDE. Then all one would have to do is indicate if the layout was to apply to Both or not.
I don’t like to think just of Portrait and Landscape.
Let’s assume, you hold your iPad in “Landscape”, but have multiple Apps opened with SplitView / MultiTasking.
In 1/3 and 1/2 split view the content of the App looks “Portrait” (while the Device is still “Landscape”).
In 2/3 split view the content of the App looks “Square” (while the Device is still “Landscape”).
In “Full Screen” the content of the App of course looks “Landscape”.
There’s more than just Portrait/Landscape involved… That’s why I personally think it’s not a good idea trying to somehow restrict it to just that difference.
I think you and Douglas have convinced me. Given the range of possibilities, how about this:
We could name a set of constraints made in the IDE. Then as orientations/view changes are detected, the whole set could be applied at once.