由于iOS7在UIWebView中添加了空白空间,所以我加载了本地html文件(因为我没有足够的分数,所以我无法发布图像) image can be seen here- snap shot from iPhone simulator, uiwebview surrounded by black frame, the html content is grey, but there is white added above it在UIWebview中添加空白 - 在iOS7和iOS8中删除UIWebView空白
我试图调整使用变焦
[webView stringByEvaluatingJavaScriptFromString:@"document. body.style.zoom = 5.0;"];
webView.scalesPageToFit = NO;
我还设置试图删除白色间距:
NSString *padding = @"document.body.style.margin='0';document.body.style.padding = '0'";
[webView stringByEvaluatingJavaScriptFromString:padding];
仍然没有运气。在桌面chrome浏览器中没有空白。 html文件是Google Swiffy文件 - 包含html和JSON。
对不起,我不在那里看到空间。你能上传一个简单的截图吗? –
@ ott--对不起,我没有enuf代表点! HTML有灰色的背景,HTML被托管在一个框架内,灰色以上的白色是空间,它是iPhone模拟器的快照 – DevC
但是,您可以将完整的屏幕截图发送到imageshack,就像其他图像一样(甚至从具有边界的模拟器)。 –