关于iPhoneX的问题。我想把iPhoneX的启动图像(1125px×2436px)放在普通文件夹中。不在LaunchImage源中。什么是iPhoneX的Launch Image名称?就像'Default-iOS8-736h @ 3x'一样,我在https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/launch-screen/找不到名字。
答案 0 :(得分:22)
您可以为iPhone X添加静态启动图像,只需添加: Default-375w-812h@3x.png
答案 1 :(得分:14)
遵循惯例,它应命名为Default-812h@3x.png
(和Default-Landscape-812h@3x.png
)(812 is the actual height in points)。
而且看起来目前没有办法使用故事板驱动的启动画面,并且iPhone X和旧尺寸型号都有像素完美的图像。
答案 2 :(得分:8)
您可以使用旧项目为iPhone X添加静态启动图像,步骤为:
1, Select Assets.xcassets select launch image folder.
2, Check "iOS 8.0 and later" in the right Attribute inspector panel.
3, An iPhone X place holder will appear, drag an image 375w812h @ 3x to it and you are done.
答案 3 :(得分:5)
如果launchImage源名称为“LaunchImage”。
名字应该是
[UIImage imageNamed:@"LaunchImage-1100-2436h@3x.png"]
/Users/hite/Library/Developer/CoreSimulator/Devices/5CFE3CFA-94F8-45EC-BAC5-xxx2/
myFit.app
和Show Package Contents
。答案 4 :(得分:3)
您可以使用Info.plist
密钥在<{1}}中定义名称:
UILaunchImages
风景图像的效果相同。