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

    1. <legend id='SgduC'><style id='SgduC'><dir id='SgduC'><q id='SgduC'></q></dir></style></legend>
      • <bdo id='SgduC'></bdo><ul id='SgduC'></ul>
    2. <tfoot id='SgduC'></tfoot>

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

        iOS - UIWebView 由于解析错误而无法工作

        时间:2023-10-21
      1. <legend id='tJZcg'><style id='tJZcg'><dir id='tJZcg'><q id='tJZcg'></q></dir></style></legend>
          <tbody id='tJZcg'></tbody>

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

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

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

                1. 本文介绍了iOS - UIWebView 由于解析错误而无法工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想在我的应用中播放 Youtube 视频.所以,我写了以下代码

                  I want to play a Youtube video in my app. So, I wrote the following code

                  NSString *embedHTML = @"
                  <html><head>
                  <style type="text/css">
                  body {
                  background-color: transparent;
                  color: white;
                  }
                  </style>
                  </head><body style="margin:0">
                  <embed id="yt" src="%@" type="application/x-shockwave-flash" 
                  width="%0.0f" height="%0.0f"></embed>
                  </body></html>";
                  
                  NSString* html = [NSString stringWithFormat:embedHTML, videoURL, self.view.frame.size.width, self.view.frame.size.height];  
                  
                  [videoView loadHTMLString:html baseURL:nil]; 
                  

                  videoView 是一个 UIWebView.这工作得很好,直到后来,视图什么也没显示.只是一个空白的白色视图.我得到了这个日志:

                  The videoView is a UIWebView. This was working just fine until later, the view shows nothing. Just a blank white view. And I got this log:

                  *** WebKit discarding exception: <NSRangeException> *** -[__NSCFString substringToIndex:]: Range or index out of bounds
                  

                  推荐答案

                  使用:

                  http://www.youtube.com/v/XXXXXXX

                  代替:

                  http://www.youtube.com/watch?v=XXXXXXX

                  在这里找到:https://devforums.apple.com/message/705665#705665

                  这篇关于iOS - UIWebView 由于解析错误而无法工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:tableView:indexPathForCell 返回 nil 下一篇:如何通过“下拉和释放"刷新 UIWebView手势?

                  相关文章

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

                  2. <tfoot id='5ct5R'></tfoot>

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