Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange flickering with UIWebView
    primarykey
    data
    text
    <p>I have this strange (short) flickering when pushing a new viewController which contains a UIView > UIWebView.</p> <p>Inside the controller.m, which contains the UIWebView, I have this code setup for the webView:</p> <p><pre><code> //EXAMPLE 1</p> <p>NSString *path = [[NSBundle mainBundle] bundlePath]; NSURL *baseURL = [NSURL fileURLWithPath:path];</p> <p>NSString <em>htmlData = [NSString stringWithFormat:@&quot;&lt;html&gt;&lt;head&gt;&lt;style type=\&quot;text/css\&quot;&gt;</em> { margin:0; padding:0; }body { background-color:#c6c6c6; width: 320px; font-family: Helvetica; font-size:13px; line-height: 18px; color:#404a52; } #someOtherStyles...&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;div id=\&quot;mededelingenDetailViewHeader\&quot;&gt;&lt;h1&gt;%@&lt;/h1&gt;&lt;p class=\&quot;date\&quot;&gt;%@&lt;/p&gt;&lt;p class=\&quot;author\&quot;&gt;%@&lt;/p&gt;&lt;/div&gt;&lt;div id=\&quot;mededelingenDetailViewContent\&quot;&gt;&lt;p&gt;%@&lt;/p&gt;&lt;/div&gt;&lt;!-- mededelingenContent --&gt;&lt;/body&gt;&lt;/html&gt;&quot;, titleString, dateString, authorString, filteredDescription ];</p> <p>[webView loadHTMLString:htmlData baseURL:baseURL];<br> </pre></code></p> <p>With this code the flickering shows up when pushing this controller onto the window. But if I change the htmlData to something simpler like the code below without for e.g. css the flickering suddenly dissappears.</p> <pre><code> //EXAMPLE 2 NSString *htmlData = [NSString stringWithFormat:@&quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;Some Header!&lt;/h1&gt;&lt;p&gt;Some text&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;];</code></pre> <p>So is there a way to load an .html file inside my NSBundle and assign NSString to some HTML contents like I did with htmlData in example 1? Or is there any better way to do this?</p> <p>Thx!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload