xcode 带有选项卡栏 backbone 的Lauch屏幕情节串连图板

mv1qrgav  于 2023-08-07  发布在  其他
关注(0)|答案(1)|浏览(93)

与启动屏幕HUG示例类似,我想为启动屏幕创建一个带有选项卡栏的框架。


的数据
应用程序本身只是一个电容器 Package 器,但它正在重新创建iOS标签栏。我很好,没有任何标签栏项目显示,我试图拖动Tab Bar视图与底部对齐,但它从来没有正确显示在两个主页指示灯以及主页按钮设备。如果在iPhone 14上看起来正确,iPhone SE看起来是这样的:



如果它在iPhone SE上看起来是正确的,那么在14上看起来是这样的:



我假设发生这种情况是因为我使用标签栏作为一个元素,正确的方法是使用Tab Bar Controller,但这是正确的方法吗?

5q4ezhmt

5q4ezhmt1#

使用Tab Bar Controller可以很好地工作,尽管我不确定这是否是正确的方法。

<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="9BE-Ju-foE">
    <device id="retina6_12" orientation="portrait" appearance="dark"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <scenes>
        <!--View Controller-->
        <scene sceneID="XTr-DS-Hbo">
            <objects>
                <viewController id="MA7-lE-pUF" sceneMemberID="viewController">
                    <view key="view" contentMode="scaleToFill" id="WUt-pb-Y5b">
                        <rect key="frame" x="0.0" y="0.0" width="393" height="769"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <viewLayoutGuide key="safeArea" id="iMq-5i-RNU"/>
                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                    </view>
                    <tabBarItem key="tabBarItem" title="" id="idv-bW-W7C"/>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="cen-rO-Uok" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="519" y="-34"/>
        </scene>
        <!--Tab Bar Controller-->
        <scene sceneID="kYe-wT-zvR">
            <objects>
                <tabBarController id="9BE-Ju-foE" sceneMemberID="viewController">
                    <tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translucent="NO" id="Bro-oq-ylq">
                        <rect key="frame" x="0.0" y="0.0" width="393" height="49"/>
                        <autoresizingMask key="autoresizingMask"/>
                        <color key="backgroundColor" name="tabBarColor"/>
                        <color key="barTintColor" name="tabBarColor"/>
                    </tabBar>
                    <connections>
                        <segue destination="MA7-lE-pUF" kind="relationship" relationship="viewControllers" id="aKN-A2-3jI"/>
                    </connections>
                </tabBarController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="2IT-PP-U7D" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-538" y="-35"/>
        </scene>
    </scenes>
    <resources>
        <namedColor name="tabBarColor">
            <color red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
    </resources>
</document>

字符串

相关问题