2012-07-23 41 views
0

我得到這個值,HTML,所以如何顯示在網頁流量,如果我得到這個類型的值<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>如何在iPhone中的webview上調用原始HTML文本?

+0

請參閱http://stackoverflow.com/questions/4138336/how-to-show-html-text-from-api-on-the-iphone/4138610#4138610 – 2012-07-23 10:13:44

回答

0

這應該幫助你

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

基本URL將fileURL到你的資源文件夾,如果你有任何圖像,或者你可以通過nil。用於網絡視圖

0

使用負載字符串的方法:

[web視圖loadHTMLString:myHtmlString基本URL:無];

相關問題