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

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

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

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

        UINavigationController 并呈现一个模态控制器

        时间:2023-06-12

          • <bdo id='5cJua'></bdo><ul id='5cJua'></ul>
              <tbody id='5cJua'></tbody>
            <tfoot id='5cJua'></tfoot>

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

                  <small id='5cJua'></small><noframes id='5cJua'>

                  本文介绍了UINavigationController 并呈现一个模态控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如果有一个显示 UIScrollView 全屏的 rootViewController.当我点击 UIScrollview 时,我想翻转屏幕并显示一个设置屏幕(它还有第二个屏幕,navigationController 的原因).

                  If got a rootViewController which display's a UIScrollView full screen. When I tap the UIScrollview, I want to flip the screen and display a settings screen (which also has a second screen, the reason for the navigationController).

                  我可以在我的 rootViewController 中使用以下代码来显示设置屏幕:<代码>self.navController = [[UINavigationController alloc]initWithRootViewController:self.settingsViewController];

                  I am able to display the settings screen by using the following code in my rootViewController: self.navController = [[UINavigationController alloc] initWithRootViewController:self.settingsViewController];

                  并且比:<代码>[self.navController pushViewController:self.settingsViewController 动画:YES];

                  我的问题是:当我在我的设置视图中完成后,我如何返回到 rootViewController,所以我在其中创建了导航控制器的控制器类因此不在堆栈中.

                  My question is: When I'm done in my settings view, how do I return back to the rootViewController, so the controller class in which I have created the navigation Controller and is therefore not on the stack.

                  推荐答案

                  我采用了 Apple 的解决方案,他们在 节拍器示例.

                  I've adopted Apple's solution which they use in the Metronome example.

                  我将 settingsViewController 设置为 navigationController 的 rootViewController.比我显示 navigationController 使用:

                  I'm setting the settingsViewController as the rootViewController for a navigationController. Than I display the navigationController using:

                  <代码>[self presentModalViewController:navController Animation:YES];

                  根据苹果的示例,我创建了 rootViewController 采用的 settingsViewControllerDelegate 接口.接口并不复杂,只是一个委托实例var和一个需要rootViewController实现的回调方法(settingsViewControllerDidFinish).在你调用的那个方法中:

                  As per apple's example, I've created a settingsViewControllerDelegate interface which the rootViewController adopts. The interface is not complicated, just a delegate instance var and a callback method (settingsViewControllerDidFinish) which needs to be implemented by rootViewController. In that methode you call:

                  <代码>[自我dismissModalViewControllerAnimated:是];

                  通过这种方式,我可以使用 navigationController 设置几个设置屏幕,并且可以从 navigationController 返回到 rootViewController.

                  This way I'm able to have a couple of settings-screens using a navigationController and I'm able to return out of the navigationController back to the rootViewController.

                  这篇关于UINavigationController 并呈现一个模态控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 Iphone SDK 的导航栏上添加多个按钮 下一篇:UINavigationController 后退按钮没有动画

                  相关文章

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

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

                    1. <tfoot id='xVQ91'></tfoot>