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

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

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

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

        iOS 5:在 iPad 中关闭模式后不调用 -viewWillAppear

        时间:2023-06-01

            • <bdo id='JhSNp'></bdo><ul id='JhSNp'></ul>
                <tbody id='JhSNp'></tbody>

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

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

              <tfoot id='JhSNp'></tfoot>
                  本文介绍了iOS 5:在 iPad 中关闭模式后不调用 -viewWillAppear的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在使用以下代码呈现模态:

                  I am presenting modal using the following code :

                  AddName *add = [[AddName alloc] initWithNibName:@"AddName" bundle:nil]
                  add.modalPresentationStyle = UIModalPresentationFormSheet;
                  
                  [self presentModalView:add animated:YES];
                  

                  在我工作之后,我使用以下代码返回我的主视图.

                  And After my work I use following code to go back on my main view.

                  [self dismissModalViewControllerAnimated:YES];
                  

                  所以默认调用-viewWillAppear.

                  我的问题是,

                  iOS4.3 上运行良好.

                  但它不适用于 iOS5.

                  我该怎么办?或者这是 iOS5 中的任何错误吗?

                  What should I do ? Or Is that any bug in iOS5?

                  推荐答案

                  -viewWillAppear 只保证在 -viewWillDisappear 也被调用的地方被调用.对于 iPad 上的大多数模式窗口,情况并非如此,因为它们不会遮挡整个页面.

                  -viewWillAppear is only guaranteed to be called in places where the -viewWillDisappear has also been called. For most modal windows on the iPad, this is not the case, since they don't obscure the entire page.

                  您的问题的解决方案将取决于您需要 -viewWillAppear 来做什么,但一般来说,您可能需要直接从您关闭模式的同一个地方拨打电话视图控制器.

                  The solution to your problem will depend on what you need the -viewWillAppear for, but in general, you're likely to need to make a call directly from the same place that you dismiss the modal view controller.

                  一种常见的机制,尤其是在您可能在其他地方使用相同的模态视图的情况下,是给模态视图控制器一个委托,当视图即将消失时调用该委托.这将使您有机会从模态窗口中获取响应,甚至只是在委托视图中强制重新加载数据.

                  One common mechanism for this, especially in cases where you might use that same modal view somewhere else, is to give the modal view controller a delegate which is called when the view is about to disappear. This will give you a chance to take the responses from the modal window, or even just force a data reload in the delegate view.

                  希望这会有所帮助.

                  这篇关于iOS 5:在 iPad 中关闭模式后不调用 -viewWillAppear的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Apple 触摸图标未显示在主屏幕上 下一篇:在 iOS 中捕获 Wi-Fi 网络变化事件

                  相关文章

                  最新文章

                1. <small id='m2t0d'></small><noframes id='m2t0d'>

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

                3. <legend id='m2t0d'><style id='m2t0d'><dir id='m2t0d'><q id='m2t0d'></q></dir></style></legend><tfoot id='m2t0d'></tfoot>