Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将包含在 a 中的 HTML 代码NSString直接传递到 WebKit。我正在寻找类似的东西:
NSString
[aNSTextField setString:@"foo"];
会像那样简单吗?还是我必须求助于将文本保存到文件然后使用file://url 访问它?
file://
假设你有一个WebView:
WebView
[[myWebView mainFrame] loadHTMLString:myHTMLString baseURL:myBaseURL];