<legend id='IqVj3'><style id='IqVj3'><dir id='IqVj3'><q id='IqVj3'></q></dir></style></legend>
<i id='IqVj3'><tr id='IqVj3'><dt id='IqVj3'><q id='IqVj3'><span id='IqVj3'><b id='IqVj3'><form id='IqVj3'><ins id='IqVj3'></ins><ul id='IqVj3'></ul><sub id='IqVj3'></sub></form><legend id='IqVj3'></legend><bdo id='IqVj3'><pre id='IqVj3'><center id='IqVj3'></center></pre></bdo></b><th id='IqVj3'></th></span></q></dt></tr></i><div id='IqVj3'><tfoot id='IqVj3'></tfoot><dl id='IqVj3'><fieldset id='IqVj3'></fieldset></dl></div>
  • <tfoot id='IqVj3'></tfoot>

    <small id='IqVj3'></small><noframes id='IqVj3'>

        • <bdo id='IqVj3'></bdo><ul id='IqVj3'></ul>

        如何根据 iOS 版本加载多个故事板文件?(5和6)

        时间:2023-05-31
        <legend id='hB70t'><style id='hB70t'><dir id='hB70t'><q id='hB70t'></q></dir></style></legend>
        • <tfoot id='hB70t'></tfoot>

                <tbody id='hB70t'></tbody>

                <small id='hB70t'></small><noframes id='hB70t'>

              1. <i id='hB70t'><tr id='hB70t'><dt id='hB70t'><q id='hB70t'><span id='hB70t'><b id='hB70t'><form id='hB70t'><ins id='hB70t'></ins><ul id='hB70t'></ul><sub id='hB70t'></sub></form><legend id='hB70t'></legend><bdo id='hB70t'><pre id='hB70t'><center id='hB70t'></center></pre></bdo></b><th id='hB70t'></th></span></q></dt></tr></i><div id='hB70t'><tfoot id='hB70t'></tfoot><dl id='hB70t'><fieldset id='hB70t'></fieldset></dl></div>
                  <bdo id='hB70t'></bdo><ul id='hB70t'></ul>

                  本文介绍了如何根据 iOS 版本加载多个故事板文件?(5和6)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有一个标签栏控制器应用程序,我正在尝试使其与 iOS 6 和 iOS 5 兼容.对于 iOS 6,我使用自动布局.但是当尝试在 iOS 5 上运行时,由于它无法识别 NSLayoutConstraints 而出现错误.

                  I have a tab bar controller app that I am trying to make compatible for iOS 6 and iOS 5. For iOS 6, I use auto layout. But when trying to run on iOS 5, I get an error due to it not recognizing NSLayoutConstraints.

                  据我所知,我需要在未启用自动布局的情况下使用不同的故事板.我已将我的故事板复制到一个新的,但不知道如何设置在应用委托中使用哪个故事板.

                  From what I can tell, I am required to use a different storyboard without auto layout enabled. I have copied my storyboard into a new one, but don't know how to set which storyboard to use in the app delegate.

                  执行此操作的代码是什么?

                  Whats the code to do this?

                  推荐答案

                  在您的应用程序委托中,您应该找到如下代码:

                  In your app delegate, you should find code like this:

                  UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MyStoryboard" bundle:nil];
                  self.window.rootViewController = [storyboard instantiateInitialViewController];
                  [self.window makeKeyAndVisible];
                  

                  您可以在此处添加一些代码以在您拥有的几个故事板中进行选择取决于 iOS 的版本:

                  This is where you can add some code to choose among the several storyboards that you have depending on the version of iOS:

                  UIStoryboard *storyboard;
                  NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
                  if (...) {
                      storyboard = [UIStoryboard storyboardWithName:@"MyStoryboard-v5" bundle:nil];
                  } else {
                      storyboard = [UIStoryboard storyboardWithName:@"MyStoryboard-v6" bundle:nil];
                  }
                  self.window.rootViewController = [storyboard instantiateInitialViewController];
                  [self.window makeKeyAndVisible];
                  

                  这篇关于如何根据 iOS 版本加载多个故事板文件?(5和6)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:iOS 中的访问设置应用程序 下一篇:如何在IOS中取消/退出/停止线程对象或后台运行的

                  相关文章

                  最新文章

                • <i id='MXCxV'><tr id='MXCxV'><dt id='MXCxV'><q id='MXCxV'><span id='MXCxV'><b id='MXCxV'><form id='MXCxV'><ins id='MXCxV'></ins><ul id='MXCxV'></ul><sub id='MXCxV'></sub></form><legend id='MXCxV'></legend><bdo id='MXCxV'><pre id='MXCxV'><center id='MXCxV'></center></pre></bdo></b><th id='MXCxV'></th></span></q></dt></tr></i><div id='MXCxV'><tfoot id='MXCxV'></tfoot><dl id='MXCxV'><fieldset id='MXCxV'></fieldset></dl></div>

                    <bdo id='MXCxV'></bdo><ul id='MXCxV'></ul>
                • <legend id='MXCxV'><style id='MXCxV'><dir id='MXCxV'><q id='MXCxV'></q></dir></style></legend>

                  <small id='MXCxV'></small><noframes id='MXCxV'>

                • <tfoot id='MXCxV'></tfoot>