NSString *strHTML = @"<p>你好</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;这是一个例子,请显示</p><p>外加一个table</p><table><tbody><tr class=\"firstRow\"><td valign=\"top\" width=\"261\">aaaa</td><td valign=\"top\" width=\"261\">bbbb</td><td valign=\"top\" width=\"261\">cccc</td></tr></tbody></table><p></p>";
     
    UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bonus];
    [self.view addSubview:webView];
     
    [webView loadHTMLString:strHTML baseURL:nil];

 

主要是通过   loadHTMLString:strHTML  这个方法实现

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
猜你喜欢
  • 2022-12-23
  • 2022-02-05
  • 2022-02-05
  • 2021-06-26
  • 2022-02-02
  • 2021-07-08
相关资源
相似解决方案