<legend id='Y54ep'><style id='Y54ep'><dir id='Y54ep'><q id='Y54ep'></q></dir></style></legend>

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

      1. iOS5:在模态 UIViewController 中播放 Youtube 视频时 U

        时间:2023-09-02

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

            <small id='1DOfC'></small><noframes id='1DOfC'>

                <tbody id='1DOfC'></tbody>

                  <bdo id='1DOfC'></bdo><ul id='1DOfC'></ul>
                • <legend id='1DOfC'><style id='1DOfC'><dir id='1DOfC'><q id='1DOfC'></q></dir></style></legend>
                  本文介绍了iOS5:在模态 UIViewController 中播放 Youtube 视频时 UIWebView 出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  更新:iOS 6 beta 1 上不再出现

                  UPDATE: No longer occurs on iOS 6 beta 1

                  我目前正在使用新的 iOS 5 SDK 调整现有的 iOS 4 应用程序.在读取 Youtube 视频的模态视图控制器中显示 UIWebView 时,我发现了一个新的崩溃.

                  I am currently working on adapting an existing iOS 4 application with the new iOS 5 SDK. I found a new crash when presenting a UIWebView in a modal view controller that reads a Youtube video.

                  开始阅读视频很好,但是当我尝试将其设置为全屏时,出现以下异常:

                  Starting to read the video is fine, but when I try to set it in full screen, I get the following exception :

                  Exception: UIViewControllerHierarchyInconsistency,
                  child view controller:<UIViewController: 0x6aef180> 
                  should have parent view controller:<WebViewController: 0x6a706c0> 
                  but requested parent is:<MPInlineVideoViewController: 0x6ae5d40>
                  

                  这是我在主视图控制器中实例化和呈现模态视图控制器的方式:

                  Here is how I instanciate and present my modal view controller in my main view controller :

                  - (IBAction)buttonReleased:(id)sender
                  {
                      WebViewController *webVC = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:[NSBundle mainBundle]];
                      webVC.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
                      webVC.modalPresentationStyle = UIModalPresentationPageSheet;
                      [self presentModalViewController:webVC animated:YES];
                  }
                  

                  我使用 UIModalPresentationPageSheet 作为 modalPresentationStyle,当我将此值设置为 UIModalPresentationFullScreen 时,不再出现错误.

                  I use the UIModalPresentationPageSheet as modalPresentationStyle, when I set this value to UIModalPresentationFullScreen, the error no longer occurs.

                  在我的模态 WebViewController 中,这是我加载 Youtube 视频的方式:

                  In my modal WebViewController, here is how I load my Youtube video :

                  - (void)viewDidLoad
                  {
                      [super viewDidLoad];
                  
                      [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=bDlm3eLRut0"]]];
                  }
                  

                  对这个问题有什么想法吗?如果需要,我可以提供一个完整的示例代码来隔离此崩溃.

                  Any ideas on this problem ? I can provide a full sample code that isolates this crash if needed.

                  谢谢!

                  推荐答案

                  我们通过基本实现我们自己的模态视图转换解决了这个问题.这实际上很容易做到.我在大约 4 小时内完成了它.

                  We resolved this by basically implementing our own modal view transitions. It was actually pretty easy to do; I built it in about 4 hours.

                  如果您以模态方式全屏显示,也可以避免崩溃.表单(表单或页面表单)是导致崩溃的原因.

                  You can also avoid the crash if you are presenting it modally full screen. Sheets, either form sheets or page sheets, are the causes of the crash.

                  这篇关于iOS5:在模态 UIViewController 中播放 Youtube 视频时 UIWebView 出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:respondsToSelector 外观代理失败 下一篇:ios标签栏在没有图像时将文本放在中间

                  相关文章

                  最新文章

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

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

                      • <bdo id='FsR1T'></bdo><ul id='FsR1T'></ul>
                      <tfoot id='FsR1T'></tfoot>