Embedding content on UIWebView rendering problem



I’m embedding a timeline or a single widget by using the generated HTML code.

<style type="text/css">
  a { color: #FFFFFF; }
<a class="twitter-timeline" href="https://twitter.com/Se_Railway" data-widget-id="${DATA_WIDGET_ID}"
  data-chrome="noheader nofooter noborders noscrollbar" data-link-color="${DATA_LINK_COLOR}"></a>
<script onload="widgetLoaded()" onerror="widgetError()" src="https://platform.twitter.com/widgets.js"></script>

Sometimes the content is shown correctly, but some other time looks like the page can not be rendered correctly.
I have made a video so that is clear what happens: https://youtu.be/5bX00iDBDYw

I hope someone could help me figure out what is wrong.


Can you try without noscrollbar? That flag is known to cause some issues in some browsers.

scrollbar is almost never shown in mobile browsers, so you shouldn’t need that option. If you do need it, I would love to hear more info on your webview environment.


Removing noscrollbar made the trick, now the webview is rendered properly and there is no scrollbar visible as you said.

Thanks @indianburger for your help


I just notice that I have another issue with the same configuration. The content of the webview get blank after less than 1 minute. I have an empty header and empty body. Is this another known issue?


Don’t quite know what’s going on there. I have filed a ticket and we’ll investigate this soon. Any sample code you provide, especially on the iOS side would be great. I might use Cordova to setup an iOS webview, but if you have better suggestions I am all ears.


I have prepared a project for you and the issue was not reproducible, then I realise the problem was not related to your webview. Thanks very much for the support


Glad you got it working. Good luck!