shaffex

ViewThatFits is a container view that attempts to fit its child views within the available space. It evaluates each child view in the order they are provided and displays the first one that fits within the constraints.

<body>
    <viewthatfits>
        <text font="largeTitle">This text should fit in landscape mode</text>
        <text>This text should fit in portrait mode</text>
    </viewthatfits>
</body>

Screenshot