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

      • <bdo id='9UvkA'></bdo><ul id='9UvkA'></ul>

    1. <legend id='9UvkA'><style id='9UvkA'><dir id='9UvkA'><q id='9UvkA'></q></dir></style></legend>

        <small id='9UvkA'></small><noframes id='9UvkA'>

        <tfoot id='9UvkA'></tfoot>

        基础国际化和多个故事板无法正常工作

        Base internationalization and multiple storyboard not working right(基础国际化和多个故事板无法正常工作)

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

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

              • <tfoot id='Pkc3k'></tfoot>
                  本文介绍了基础国际化和多个故事板无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 xCode 4.6 上的多个故事板和基础本地化.其实我

                  I'm playing with multiple storyboards and base localization on xCode 4.6. In fact I

                  我做到了:

                  1) 编辑我的项目信息本地化:选中使用基础国际化"并添加语言:英语、中文

                  1) edit my project infos localisations: checked "Use Base Internationalization" and added Languages: English, Chinese

                  2) 创建一个名为anotherstoryboard.storyboard"的新故事板

                  2) create a new storyboard called "anotherstoryboard.storyboard"

                  3) 使用 Base 国际化本地化我的新故事板(文件检查器/本地化 - 本地化).

                  3) localize my new storyboard (File Inspector / Localize - Localize) using Base internationalization.

                  4) 在我的应用委托中,我动态加载我的本地化故事板,如下所示:

                  4) in my app delegate, I load dynamically my localized storyboard, like this:

                  UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"anotherstoryboard" bundle:nil];
                  

                  案例 1: => 有效

                  对于我的新故事板(第 3 步),我选择本地化中文 - Interface Builder Cocoa Touch Storyboard

                  For my new storyboard (step 3) I choose Localization Chinese - Interface Builder Cocoa Touch Storyboard

                  它可以工作,但现在我必须维护本地化的故事板,用 IB 编辑它们.我不想要这样的行为,我只想使用基础国际化和本地化 .strings 文件.

                  It works but now I have to maintain localized storyboard, editing them with IB. I don't want such behavior, I just want to use base internationalization and localize .strings files.

                  案例 2: => 崩溃

                  对于我的新故事板(第 3 步),我选择 Localization Chinese - Localizable Strings

                  For my new storyboard (step 3) I choose Localization Chinese - Localizable Strings

                  应用程序崩溃说找不到我的故事板

                  The app crashes saying it can't find my storyboard

                  'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'anotherstoryboard' in bundle NSBundle </Users/me/Library/Application Support/iPhone Simulator/6.1/Applications/8E036C84-6058-4420-94B4-1726E1F686AD/HelloWorld.app> (loaded)'
                  

                  我做错了什么?为什么 iOS 在案例 2 中找不到正确的故事板?

                  What I'm doing wrong ? Why doesn't iOS find the right storyboard in case 2 ?

                  推荐答案

                  在 Xcode 4.6.2 中开始本地化新故事板后,我刚刚(再次)遇到了同样的问题.我检查了一切是否按照此处和其他地方的建议正确设置,确实如此.

                  I had just run into the same issue (again) after starting localizing a new storyboard in Xcode 4.6.2. I checked everything was setup up properly as suggested here and elsewhere, and indeed it was.

                  对我来说,通过在 Xcode 中关闭项目并从 Finder 中手动清除 XcodeDerived Data"目录(请参阅 Xcode 首选项)解决了这个问题.然后我重新打开项目,进行了干净的构建,瞧,故事板被正确编译并按预期工作.

                  For me, the issue was resolved by closing the project in Xcode and manually clearing the Xcode "Derived Data" directory (see Xcode preferences) from the Finder. Then I reopened the project, made a clean build, and voilá, the storyboard got compiled properly and worked as expected.

                  这篇关于基础国际化和多个故事板无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  iOS AutoLayout - get frame size width(iOS AutoLayout - 获取帧大小宽度)
                  Auto layout constraints issue on iOS7 in UITableViewCell(UITableViewCell中iOS7上的自动布局约束问题)
                  How to resize superview to fit all subviews with autolayout?(如何调整超级视图的大小以适应所有具有自动布局的子视图?)
                  Springs in Auto Layout: Distribute views evenly, with constraints, in Xcode 5(自动布局中的弹簧:在 Xcode 5 中使用约束均匀分布视图)
                  reloadData() of UITableView with Dynamic cell heights causes jumpy scrolling(具有动态单元格高度的 UITableView 的 reloadData() 导致跳跃滚动)
                  What is NSLayoutConstraint quot;UIView-Encapsulated-Layout-Heightquot; and how should I go about forcing it to recalculate cleanly?(什么是 NSLayoutConstraint“UIView-Encapsulated-Layout-Height?我应该如何强制它干净地重新计算?) - IT屋-程序员

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

                          <tfoot id='twjas'></tfoot>

                          • <small id='twjas'></small><noframes id='twjas'>