ios - Assign HTML tag string in NSstring for UIweb view -


how assign html tag string format string directly, can display in uiweb view directly.

 <tr>       <td align="center"><b>    disclaimer</b></td>    </tr>      <tr>        <td colspan="2" style="text-align:justify" class="imageborder">     <p>  personal trainer endeavor bhasinsoft provide in depth details , knowledge on exercises , workout regimes work towards health , fit body. while great care has been taken provide accurate knowledge , details possible referring knowledge in public domain, guidance fitness specialists , doctors, bhasinsoft not responsible accuracy of data.  data provided , understand bhasinsoft not responsible accuracy, usefulness or safety resulting use of content. further understand , acknowledge may exposed content inaccurate, offensive, indecent, or objectionable, , agree waive, , hereby waive, legal or equitable rights or remedies have or may have against bhasinsoft respect thereto, and, extent permitted applicable law, agree indemnify , hold harmless bhasinsoft, owners, operators, affiliates, licensors, , licensees fullest extent allowed law regarding matters related use of content.  agree use of content shall @ sole risk. fullest extent permitted law, bhasinsoft, officers, directors, employees, , agents exclude warranties, express or implied, in connection services , use thereof. fullest extent permitted law, bhasinsoft excludes warranties, conditions, terms or representations accuracy or completeness of content , assumes no liability or responsibility (i) errors, mistakes, or inaccuracies of content, (ii) personal injury or property damage, of nature whatsoever, resulting access , use of our services or content, and/or (iii) errors or omissions in content or loss or damage of kind incurred result of use of content. bhasinsoft not warrant, endorse, guarantee, or assume responsibility product or service advertised or offered third party through services or hyperlinked services or featured in banner or other advertising, , bhasinsoft not party or in way responsible monitoring transaction between , third-party providers of products or services. purchase of product or service through medium or in environment, should use best judgment , exercise caution appropriate.   </p> 

so can display in same format present method.

 self.webview=[[uiwebview alloc]initwithframe:cgrectmake(0, 14 , 320, 343)];  nsstring *tttt=[nsstring stringwithstring:@" <tr> <td align="center"><b>disclaimer</b></td></tr> ";  [  self.webview loadhtmlstring:self.app.musclesl baseurl:[nsurl fileurlwithpath:[[nsbundle mainbundle] bundlepath]]]; [self.secondview addsubview:self.webview]; 

do like,

nsstring *resourcepath = [[nsbundle mainbundle] resourcepath]; nsstring *pathtohtml = @"html"; nsurl *baseurl = [[nsurl alloc] initfileurlwithpath:pathtohtml isdirectory:yes];  nsstring *html = [nsstring stringwithcontentsoffile:[[nsbundle mainbundle]                                  pathforresource:@"nameoffile" oftype:@"html"                                                                                             indirectory:@"html"]                           encoding:nsutf8stringencoding error:nil]; [webview loadhtmlstring:html baseurl:baseurl]; 

it work...


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -