1
我有一个在两个方向w工作正常的ipad xib webview。 但如果我做放大在纵向模式下,然后在景观的WebView rotationg需要利润率从右侧webad的ipad方向问题和放大
- (void)viewDidLoad
{
NSString *[email protected]"http://www.plus.al";
NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
webView.scalesPageToFit = YES;
[webView loadRequest:request];
}
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
if (UIInterfaceOrientationIsLandscape(interfaceOrientation))
{
webView.frame=CGRectMake(0, 0, 1024, 748);
}
if (UIInterfaceOrientationIsPortrait(interfaceOrientation))
{
webView.frame=CGRectMake(0, 0, 768, 1004);
}
else {
if (UIInterfaceOrientationIsLandscape(interfaceOrientation))
{
webView.frame=CGRectMake(0, 0, 480, 300);
}
if (UIInterfaceOrientationIsPortrait(interfaceOrientation))
{
webView.frame=CGRectMake(0, 0, 320, 460);
}
}
return YES;
}
请帮助me.Thanks提前。
试试这个-http://stackoverflow.com/questions/2890673/iphone-uiwebview-width-does-not-fit-after-zooming-operation -uiinterfaceorienta/9035545#9035545 –
@Naina Soni我尝试过,但总是会显示修正缩放两个方向。 –