0

i getting this value for html so how show in webview if i get this type of value <head> <meta/> <title>Journey Mapper - Getting Started</title> </head> <body> <a name="top"><h3>Getting Started - Registration and Login</h3></a> <p class="style1"> <a href="Index.html">Home</a> <a href="#reg">Registration</a> <a href="#login">Login</a> <a href="#forget">Forgot Password</a> </p> <a name="reg"><h4>Regis<a href="#top" class="style1" style="text-align:right"></a></h4> </a> <p>When the application starts in a click on &quot;My Journeys&quot; tab</p> <p>Click on &quot;New User&quot; button </p> <p>A Registration form will popup enter your profile details</p> <p>Note: </p> <ul> <li>All fields are mandatory</li> <li>A password must be at least eight characters long, begin with an alphabetic character, contain at least one upper case and one lower case letter, at least one number and one of the following special characters</li> <li>A valid email address should be provided to facilitate password reset</li> <li>Active Internet connection is required to setup your profile</li> </ul> <p>Click on sign up button to complete your registration</p> <p><a name="reg" id="reg"><a href="#top" class="style1" style="text-align:right">Back to Top</a></a></p> <a name="login"><h4>Login</h4></a> <p>To login as a registered user to Journey Mapper, click on &quot;My Journey&quot; tab </p> <p>Click on &quot;Login&quot; button</p> <p>A dialog will pop up, enter your registered username and password in respective fields.</p> <p>Click on login button to validate provided credentials and to log you in.</p> <p>You can also check &quot;Auto-login&quot; to retain your login information even when application is closed.</p> <p><a name="reg" id="reg2"><a href="#top" class="style1" style="text-align:right">Back to Top</a></a></p> <a name="forget"><h4>Forgot Password</h4></a> <p>In case you have forgotten your password you can request a reset of your password.</p> <p>Click on the &quot;Forgot Password?&quot; link on the login dialog.</p> <p>A &quot;Forgot Password?&quot; form will appear, enter your username and click on the &quot;Send Password&quot; button</p> <p>An email will be sent to your registered email address, which will contain the instructions to reset your password</p> <p><a name="reg" id="reg3"><a href="#top" class="style1" style="text-align:right">Back to Top</a></a></p> <p><a name="jump" href="#">Continue reading</a></p> </body> </html>

Harish
  • 544
  • 3
  • 17
  • See http://stackoverflow.com/questions/4138336/how-to-show-html-text-from-api-on-the-iphone/4138610#4138610 – Max Nanasy Jul 23 '12 at 10:13

2 Answers2

0

This should help you out

NSString *myHTML = @"<html><body><h1>Hello, world!</h1></body></html>";
[myUIWebView loadHTMLString:myHTML baseURL:nil];

baseURL will be fileURL to your resources folder if you have any images or you can just pass nil.

Sehrish Khan
  • 309
  • 1
  • 2
  • 9
0

Use load string method for web view:

[webView loadHTMLString:myHtmlString baseURL:nil];

Hemant Dixit
  • 1,145
  • 8
  • 12