0
我用WKWebView加载从服务器返回的html字符串,并设置了CSS,但是页面没有显示手机屏幕,我该怎么办?WKWebView loadHTMLString
NSString *requestUrl = [NSString stringWithFormat:@"http://news-at.zhihu.com/api/4/news/%ld",self.story.ID];
requestSuccessBlock sblock = ^(id responseObject){
YAContentItem *content = [YAContentItem contentItemWithKeyValues:responseObject];
NSString *htmlString = [NSString stringWithFormat:@"<html><head><link rel=\"stylesheet\" type=\"text/css\" href=%@ /></head><body>%@</body></html>", content.css.firstObject, content.body];
[self.webView loadHTMLString:htmlString baseURL:nil];