Get the best fit for a layout on any iOS device

iOS devices have many different screen ratios and DPI. A layout designed for a larger device may work well enough on a slightly smaller screen but it requires the user to know that they can use a pinch gesture to minimise the layout size.

In FileMaker Go a pinch gesture will reduce the layout size. If you shrink the layout to less than the screen display height/width it will flexibly find the best fit for the display. That's very cool and I'd like to do that in my scripts.

The Set Zoom Level command comes to our aid. I started testing with 'Zoom Out.' That worked in some cases, but not in others. I finally found that Set Zoom Level [25%] was best. In my testing that always reduced the layout size enough so that FileMaker Go would resize it to find the best fit.

Go to Layout [ ]
If ( Get ( SystemPlatform ) = 3 ]
     Set Zoom Level [25%]
End If