Splash in ios app

回眸只為那壹抹淺笑 提交于 2020-01-06 03:44:05

问题


I'm working on old project without constraints and this splash images.

Default-568h@2x.png                640 x 1136
Default.png                        320 x 480
Default@2x.png                     640 x 960

not have Images.xcassets catalog and not have configured this splash in .plist like THIS POST.

All this causes me big impression, because I had never seen anything like it.

Investigating all that, I realized that i had to do anything to make it work, it is only necessary to have the splash with these specific names and it works throughout the application very well on all devices (includingipad).

*All excellent here. !!Looks good in all Devices!!!! *

Now the big problem is that I need to have a different splash for each target. So I based on the above mentioned post, i try adding everything in the Images.xcassets or .plist (I tried 2 ways).

I even noticed some dimensions that made me more.

DefaultQA-568h.png                   320 x 568      
DefaultQA-568h@2x.png                640 x 1136
DefaultQA-667h@2x.png                750 x 1334
DefaultQA-736h@3x.png                1242 x 2208
DefaultQA.png                        320 x 480
DefaultQA@2x.png                     640 x 960

I put another name because it did not want the original target that work well, are damaged

But the application on some devices looks very bad (iPhone 6 and iPad). But in the target which has not set the splash in .plist or Images.xcassets, still it works perfect.

There any way to have 2 groups splash by default for each target, without having to configure them in the .plist or Images.xcassets?


回答1:


Yes, you can create different splash screens for different targets without changing Images.xcassets or .plist files.

You can even use the same file name as long as they are on different folders like so:

Just select each splash screen image you want and make sure only the correct target can see that image. For example:

This way, the only asset the target will see is the one assigned to it. This is how the .plist looks like:

I've only did some changes to make sure no storyboard was being used to match the requirements you posted.



来源:https://stackoverflow.com/questions/37015436/splash-in-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!