是否可以显示当前的HTML我NSString成UIWebView?
我的解决方案是将html写入文件,然后像这样解析它:
[WebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];
Run Code Online (Sandbox Code Playgroud)
但是,我更喜欢更优雅的解决方案.
| 归档时间: |
|
| 查看次数: |
1127 次 |
| 最近记录: |