Many children's shoes need to obtain the default startup diagram during development, but they do not want to add it once more to increase the package. The previous method does not work. How can they be obtained?
[Objc]View plaincopy
- Self. startimageview = [[uiimageview alloc] initwithframe: Self. Window. bounds];
- F (iphone5 ){
- Self. startimageview. Image = [uiimage imagenamed: @ "LaunchImage-700-568h"];
- } Else if (iphone6 ){
- Self. startimageview. Image = [uiimage imagenamed: @ "LaunchImage-800-667h"];
- } Else if (iphone6plus ){
- Self. startimageview. Image = [uiimage imagenamed: @ "LaunchImage-800-Portrait-736h"];
- } Else {
- Self. startimageview. Image = [uiimage imagenamed: @ "LaunchImage-700"];
- }
- [Self. Window addsubview: Self. startimageview];
If your program is compatible with less than 7.0, You need to determine the version, because obtaining the launch image on ios6 is @ "launchimage"
Get the default launch image launchimage from images. xcassets