解决方法
您不能在启动屏幕中运行代码或使用任何自定义类.
您必须提供一个可伸缩的图像,其中包含足够的数据,使其在所有分辨率中都可行.
此外,您可以利用@ 2x和@ 3x修饰符.
iPhone 6 plus将尝试加载@ 3x修饰符AFAIK.
作为最后的手段,如果启动屏幕xib不足够,您仍然可以使用UILaunchImages plist键,并指定最小版本8.0的映像.缺点是Xcode不会为您自动生成,因此您必须手动编写它们.还要记住,iPhone 6加上图像的修饰符是@ 3x
一个例子:
UILaunchImage = Default // This is for iOS 6,if you need it UILaunchImages // iOS 7,8 - [0] - UILaunchImageName = Default - UILaunchImageMinimumOSVersion = 7.0 - UILaunchImageSize = {320,480} - UILaunchImageOrientation = Portrait - [1] - UILaunchImageName = Default-568h - UILaunchImageMinimumOSVersion = 7.0 - UILaunchImageSize = {320,568} - UILaunchImageOrientation = Portrait - [2] - UILaunchImageName = Default-667h - UILaunchImageMinimumOSVersion = 8.0 - UILaunchImageSize = {375,667} - UILaunchImageOrientation = Portrait - [3] - UILaunchImageName = Default-736h - UILaunchImageMinimumOSVersion = 8.0 - UILaunchImageSize = {414,736} - UILaunchImageOrientation = Portrait