UI Layout help - Autoresizing the form

AlexFredricksAlexFredricks USMember ✭✭
edited October 11 in Xamarin.iOS

I could use some advice. This form shows correctly before iOS13 and now it it slightly skewed. How can I make this form adjust for smaller and larger ipads(pro)? This code works great on an ipad 2 but not on an ipad prod. Is the autoresizingMask controlling this?

I should mention I am unable to view XIB in designer. I'm using Visual Studio 2019 and have the latest xcode.

Image

Form Code
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="InspectionPdfController">
<connections>
<outlet property="btnDone" destination="8pJ-6s-mSd" id="V7p-h6-ow2"/>
<outlet property="btnEmail" destination="h63-BN-1J3" id="MhM-GS-GUq"/>
<outlet property="view" destination="iN0-l3-epB" id="kCW-yf-GMq"/>
<outlet property="vwWeb" destination="Q2i-c2-cYF" id="wGW-xa-CW3"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<navigationBar contentMode="scaleToFill" fixedFrame="YES" barStyle="black" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V6w-bT-kOu" customClass="BlackUINavigationBar">
<rect key="frame" x="0.0" y="0.0" width="936" height="44"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<items>
<navigationItem title="FORM PDF" id="xPS-sg-2wS">
<barButtonItem key="leftBarButtonItem" title="EMAIL" style="done" id="h63-BN-1J3"/>
<barButtonItem key="rightBarButtonItem" title="DONE" style="done" id="8pJ-6s-mSd"/>
</navigationItem>
</items>
</navigationBar>
<webView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Q2i-c2-cYF">
<rect key="frame" x="0.0" y="44" width="934" height="704"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</webView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
<point key="canvasLocation" x="609" y="451"/>
</view>
</objects>

Best Answer

  • AlexFredricksAlexFredricks US ✭✭
    edited October 11 Accepted Answer

    I figured out my issue. I needed to add autoresizingMask to Navbar and WebView.

    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>

Answers

  • AlexFredricksAlexFredricks USMember ✭✭
    edited October 11 Accepted Answer

    I figured out my issue. I needed to add autoresizingMask to Navbar and WebView.

    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>

Sign In or Register to comment.