对于所有类型的设备,我都有带有名称的默认初始屏幕:Default-568h@2x.png、Default-Portrait.png、Default.png、Default@2x.png 等等。
我知道系统会自动为特定设备选择合适的启动画面并显示出来。
问题:是否有可能知道系统选择了哪个图像?如何将系统选择的合适图片加载到UIimageView中。
我试过这个:
UIImageView *splashView=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight)];
splashView.image=[UIImage imageNamed:@"Default.png"];
但它只为所有类型的设备(iPhone 4、5、iPad)加载名称为 Default.png 的图像。
我需要手动管理吗?我的意思是在识别设备类型后加载适当的图像?