我有一个iOS启动屏幕,它周围一直显示蓝色边框。我听说这个词和信息有关。plist有一个LaunchStoryboard值(https://forums.xamarin.com/discussion/34081/splash-screen-on-an-xamarin-forms-app-ios),但我没有这样的关键在我的info.plist。什么好主意吗?
这是我的info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDisplayName</key>
<string>MDLDemo</string>
<key>CFBundleIdentifier</key>
<string>com.demo.mdl.hcm</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleIconFiles</key>
<array>
<string>icon-60@2x.png</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<key>UIPrerenderedIcon</key>
<false/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
这是我的LaunchScreen。故事板文件<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="gAE-YM-kbH">
<objects>
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" misplaced="YES" image="Default-568h.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
<variation key="heightClass=regular-widthClass=compact" misplaced="YES">
<rect key="frame" x="-8" y="-79" width="390" height="825"/>
</variation>
<variation key="widthClass=compact" misplaced="YES">
<rect key="frame" x="-100" y="0.0" width="600" height="600"/>
</variation>
<variation key="widthClass=regular" misplaced="YES">
<rect key="frame" x="-123" y="-4" width="625" height="678"/>
</variation>
</imageView>
</subviews>
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39"/>
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="349" y="339"/>
</scene>
</scenes>
<resources>
<image name="Icon-60.png" width="120" height="120"/>
<image name="Default-568h.png" width="640" height="1136"/>
<image name="Default-Portrait.png" width="768" height="1004"/>
<image name="Default.png" width="320" height="480"/>
<image name="Icon-Small-40.png" width="120" height="120"/>
<image name="Icon-Small.png" width="87" height="87"/>
<image name="Untitled 320 480.png" width="320" height="480"/>
<image name="Untitled 640 1136.png" width="640" height="1136"/>
<image name="background.png" width="541" height="613"/>
<image name="background_bottom.png" width="539" height="499"/>
<image name="background_top.png" width="539" height="12"/>
<image name="email.png" width="42" height="43"/>
<image name="FirstTimeCheckIn.png" width="601" height="789"/>
<image name="forgot_password.png" width="46" height="37"/>
<image name="icon-60.png" width="120" height="120"/>
<image name="icon 320 480.png" width="320" height="480"/>
<image name="icon 640 1136.png" width="640" height="1136"/>
<image name="icon 640 960.png" width="640" height="960"/>
<image name="menu.png" width="33" height="54"/>
<image name="password.png" width="39" height="37"/>
<image name="Register.png" width="809" height="1000"/>
<image name="remember_me.png" width="50" height="43"/>
<image name="Assets/FirstTimeCheckIn.png" width="601" height="789"/>
<image name="Assets/search.png" width="35" height="35"/>
<image name="Assets/greenMessage.png" width="54" height="51"/>
<image name="Assets/orangeMessage.png" width="54" height="51"/>
<image name="Assets/redMessage.png" width="54" height="51"/>
<image name="Assets/settings.png" width="24" height="24"/>
<image name="Assets/search2.png" width="24" height="24"/>
<image name="Assets/icons_white/add.png" width="44" height="44"/>
<image name="Assets/icons_white/camera.png" width="44" height="44"/>
<image name="Assets/icons_white/clipboard.png" width="44" height="44"/>
<image name="Assets/icons_white/confirm.png" width="44" height="44"/>
<image name="Assets/icons_white/email.png" width="44" height="44"/>
<image name="Assets/icons_white/enter_password.png" width="44" height="44"/>
<image name="Assets/icons_white/left_arrow.png" width="44" height="44"/>
<image name="Assets/icons_white/menu.png" width="44" height="44"/>
<image name="Assets/icons_white/message.png" width="44" height="44"/>
<image name="Assets/icons_white/microphone.png" width="44" height="44"/>
<image name="Assets/icons_white/no.png" width="44" height="44"/>
<image name="Assets/icons_white/patiente_id.png" width="44" height="44"/>
<image name="Assets/icons_white/phone_number.png" width="44" height="44"/>
<image name="Assets/icons_white/right_arrow.png" width="44" height="44"/>
<image name="Assets/icons_white/search.png" width="44" height="44"/>
<image name="Assets/icons_white/settings.png" width="44" height="44"/>
<image name="Assets/icons_white/trash.png" width="44" height="44"/>
<image name="Assets/icons_white/username.png" width="44" height="44"/>
<image name="Assets/icons_white/write_msg.png" width="44" height="44"/>
<image name="Assets/icons_white/write_name.png" width="44" height="44"/>
<image name="Assets/icons_white/yes.png" width="44" height="44"/>
<image name="Assets/icons_blue/add.png" width="44" height="44"/>
<image name="Assets/icons_blue/camera.png" width="44" height="44"/>
<image name="Assets/icons_blue/clipboard.png" width="44" height="44"/>
<image name="Assets/icons_blue/confirm.png" width="44" height="44"/>
<image name="Assets/icons_blue/email.png" width="44" height="44"/>
<image name="Assets/icons_blue/enter_password.png" width="44" height="44"/>
<image name="Assets/icons_blue/left_arrow.png" width="44" height="44"/>
<image name="Assets/icons_blue/menu.png" width="44" height="44"/>
<image name="Assets/icons_blue/message.png" width="44" height="44"/>
<image name="Assets/icons_blue/microphone.png" width="44" height="44"/>
<image name="Assets/icons_blue/no.png" width="44" height="44"/>
<image name="Assets/icons_blue/patiente_id.png" width="44" height="44"/>
<image name="Assets/icons_blue/phone_number.png" width="44" height="44"/>
<image name="Assets/icons_blue/right_arrow.png" width="44" height="44"/>
<image name="Assets/icons_blue/search.png" width="44" height="44"/>
<image name="Assets/icons_blue/settings.png" width="44" height="44"/>
<image name="Assets/icons_blue/trash.png" width="44" height="44"/>
<image name="Assets/icons_blue/username.png" width="44" height="44"/>
<image name="Assets/icons_blue/write_msg.png" width="44" height="44"/>
<image name="Assets/icons_blue/write_name.png" width="44" height="44"/>
<image name="Assets/icons_blue/yes.png" width="44" height="44"/>
<image name="Assets/icons_white/white_arrow.png" width="8" height="12"/>
<image name="Assets/icons_white/white_arrow2.png" width="8" height="12"/>
<image name="Assets/icons_white/white_balloon.png" width="200" height="40"/>
<image name="Assets/icons_blue/blue_arrow.png" width="8" height="12"/>
<image name="Assets/icons_blue/blue_arrow2.png" width="8" height="12"/>
<image name="Assets/icons_blue/blue_balloon.png" width="200" height="40"/>
<image name="Assets/white_balloon-03.png" width="214" height="60"/>
<image name="Assets/blue_ballon-03.png" width="214" height="60"/>
<image name="Assets/girl60x60.png" width="60" height="60"/>
<image name="Assets/boy60x60.png" width="60" height="60"/>
<image name="Assets/boy40x40.png" width="40" height="40"/>
<image name="Assets/girl40x40.png" width="40" height="40"/>
<image name="Assets/logo_transp60x60.png" width="60" height="60"/>
<image name="Assets/logo_transp240x240.png" width="240" height="240"/>
<image name="Assets/logo240x240.png" width="240" height="240"/>
<image name="Assets/logo60x60.png" width="60" height="60"/>
<image name="Assets/yes88x88.png" width="88" height="88"/>
<image name="Assets/no88x88.png" width="88" height="88"/>
<image name="Assets/splash_texture.png" width="750" height="1334"/>
<image name="Assets/bg.png" width="750" height="1334"/>
<image name="Assets/back_arrow.png" width="44" height="44"/>
<image name="Assets/background.png" width="541" height="613"/>
<image name="Assets/menu.png" width="23" height="21"/>
<image name="Assets/email.png" width="42" height="43"/>
<image name="Assets/forgot_password.png" width="46" height="37"/>
<image name="Assets/password.png" width="39" height="37"/>
<image name="Assets/remember_me.png" width="50" height="43"/>
<image name="Assets/Register.png" width="809" height="1000"/>
<image name="Assets/persona.png" width="79" height="70"/>
<image name="Assets/personb.png" width="70" height="67"/>
<image name="Assets/avatar-man.png" width="318" height="318"/>
<image name="Assets/icon-plus.png" width="300" height="300"/>
<image name="Assets/messaging-send.png" width="54" height="57"/>
<image name="Assets/messsaging-camera.png" width="59" height="50"/>
<image name="splashscreen-small.png" width="320" height="480"/>
<image name="Default-667h.png" width="640" height="1136"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedScreenMetrics key="destination" type="retina47"/>
</simulatedMetricsContainer>
</document>
我修复了。我最后使用了Xamarin。iOS启动屏幕教程,在Storyboard教程(https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/launch-screens/#storyboard)上,遵循所有屏幕上的说明。然而,当我到达:
- 滚动到编辑器的Universal Launch Images部分,打开Launch Screen下拉菜单并选择故事板的名称
我的自定义故事板没有出现在启动屏幕下拉菜单中。我最终选择了默认的源(我的解决方案中的"LaunchImage"),并且在启动屏幕上,我手动输入了我的故事板的文件名(没有.storyboard扩展名)。之后一切正常