I have one html file like this one.
<body class="iphone" onLoad="doSomething()">
<div id="title_wrapper"><h2 id="title">[[[TITOLO]]]</h2></div>
<h2 id="subtitle">[[[DATA]]]</h2>
<div id="content">
[[[TESTO]]]
</div>
I load it into my UIWebView and I want to replace the “[[[TESTO]]]” with the content of one NSString Variable.
How can I do?
Why do you have to do it in javascript?
To do it in Objective-C, just go:
That will get you the HTML with your variable instead of [[TEST0]], which you can then load into your UIWebView using
loadHTMLString:baseURL:.