简体   繁体   English

iOS Objective-C:如何在Xcode项目中同时具有启动xib文件和静态启动图像?

[英]iOS Objective-C: How to have both Launch xib file and static launch images in Xcode project?

We support all the iPhone and iPad models for our iOS application. 我们为我们的iOS应用程序支持所有iPhone和iPad型号。 Speaking on OS version support, we support iOS 6 and later. 说到OS版本支持,我们支持iOS 6及更高版本。

As of now, we are using STATIC LAUNCH IMAGE FILES for the splash screen purpose. 到目前为止,我们将STATIC LAUNCH IMAGE FILES用于初始屏幕。 To be specific, we have added 13 different launch image files in images.xcassets to support the range of devices. 具体来说,我们在images.xcassets中添加了13个不同的启动图像文件,以支持各种设备。

As everyone must be aware, Apple have moved forward with the concept of LAUNCH xib FILE from iOS 8 onwards. 众所周知,Apple从iOS 8开始采用了LAUNCH xib FILE的概念。 And they suggest to use the same specifically for iPhone 6/6S and iPhone 6 Plus/6S Plus. 他们建议专门为iPhone 6 / 6S和iPhone 6 Plus / 6S Plus使用相同的功能。 Below is the quote from HIG. 以下是HIG的报价。

"Although it's best to use a launch file for iPhone 6 and iPhone 6 Plus, you can instead supply static launch images if necessary." “尽管最好将启动文件用于iPhone 6和iPhone 6 Plus,但如有必要,您可以提供静态启动图像。”

They also tell the point that, developers can use both static launch image and launch image file in one project. 他们还指出,开发人员可以在一个项目中同时使用静态启动映像和启动映像文件。 Below is the relevant quote from HIG. 以下是HIG的相关报价。

"If you also need to support earlier versions of iOS, you can continue to supply static launch images in addition to a launch file." “如果您还需要支持iOS的早期版本,则除了启动文件之外,您还可以继续提供静态启动映像。”

Keeping in the point in mind that we need to support iOS 6 onwards, we need to have both static launch images (which we already have) and dynamic launch xib file (which we need to add). 请记住,我们需要支持iOS 6以上版本,我们需要同时具有静态启动映像(我们已经拥有)和动态启动xib文件(我们需要添加)。 But, how do we keep both the things together in our project? 但是,如何在我们的项目中将这两件事放在一起? And how does it really work? 以及它如何真正起作用? Any help on this will be greatly appreciated. 任何帮助,将不胜感激。

All I had to do to support both of these things in my project was migrate to the .xib file and just leave the launch images in the project. 为了在项目中同时支持这两个方面,我要做的所有工作都迁移到了.xib文件,只是将启动映像留在了项目中。 It's easy to test that it still works with an iOS 7 device or simulator. 可以轻松测试它是否仍可与iOS 7设备或模拟器一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我是否必须具有iOS 8启动映像的LaunchScreen.xib? - Do I have to have LaunchScreen.xib for iOS 8 launch images? 使用Xcode 5在iOS 7中启动图像 - Launch Images in iOS 7 with Xcode 5 启动时在iPhone Objective-C项目中执行C代码 - Execute C Code in iPhone Objective-C Project on Launch 从Objective-C iOS 9启动设备Twitter设置 - Launch device twitter settings from objective-c iOS 9 Swift项目在启动时崩溃-与Objective-C一起使用 - Swift project crashes on launch - works with Objective-C Unity在Objective-C中部署到xcode:如何延迟didFinishLaunching中的启动屏幕? - Unity deploying to xcode in objective-C: how to delay launch screen in didFinishLaunching? 使用静态启动图像而不是启动文件 - Use static launch Images instead of launch file 如何为iOS应用程序的不同设备设置不同的启动文件(xib,而不是启动图像) - How to set different Launch File (xib, not launch image) for different device for iOS application 如何将自定义 UITableViewCell 添加到 xib 文件中 - How to add a custom UITableViewCell to a xib file objective-c 如何在Xcode Objective-C项目中的.mm类扩展中导入/使用快速静态库/框架 - How to import/use swift static library/framework in to .mm class extension in Xcode Objective-C Project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM