0
我在我的project.Where使用的UIWebView
的框架在web视图中的教改尝试是从HTML数据填补做下面这样的代码:的UIWebView +内容适合的WebView
[webView loadHTMLString:[NSString stringWithFormat:@"<html><body><font face=\"Arial\" size=\"3\"</font>%@</body></html>",[[[dict_Response objectForKey:@"objects"]objectAtIndex:0]objectForKey:@"detaildescription"]] baseURL:[NSURL URLWithString:@"http://newsletter.nobelbiocare.com/"]];
现在我设定网页视图的框架: -
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if(appDel.ori_appDel == UIInterfaceOrientationPortraitUpsideDown || appDel.ori_appDel == UIInterfaceOrientationPortrait)
{
webView.frame=CGRectMake(30,150,710,450);
}else{
webView.frame=CGRectMake(30,150,930,450);
}
return yes;
}
现在事情发生是在风景模式下的内容在适当的way.But显示当我移动到肖像模式下,它会自动显示水平scrolling.I不想要滚动网页视图中水平模式.. 请帮我..如何解决此问题。
我用了sizetofit和自动尺寸| autofixing。 但后来它也没有解决,请帮助我..
Shweta你可以尝试在'shouldAutorotateToInterfaceOrientation'刷新页面。 –
@InderKumarRathore感谢您的快速回复。但我试图做到这一点,但它没有解决问题。身体标记'%@