Load Different Launch Screen for iPad / iPhone

前端 未结 2 1940
没有蜡笔的小新
没有蜡笔的小新 2021-02-07 15:24

i want to load different launch screen storyboard for iPad and iPhone & for that i add new entry in info.plist like below

but it load only iPhone launch scr

2条回答
  •  爱一瞬间的悲伤
    2021-02-07 15:53

    You can use a single Storyboard to load different Launch images for iPad and iPhone. In your LaunchScreen.storyboard, go to the Attributes Inspector of the ImageView where you set the image. Set launch image for iPhone in Image field. There is a plus sign near the "Image" field. Click on it and change the Height from Compact to Regular and click Add Variation. Another field is created as wR hR. Add the launch image for iPad there. Thats it. Now it loads launch image based on your device.

提交回复
热议问题