1
방향 w에서 잘 작동하는 ipad xib에서 webview가 있습니다. 하지만 난 줌 - 세로 모드로 만든 다음 풍경 웹뷰에서 rotationg하는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;
}
사전에 찾아 와요 고마워요 도와주세요 오른쪽에서 마진을 취합니다.
instead- 다음 코드를 사용할 필요가 : //stackoverflow.com/questions/2890673/iphone-uiwebview-width-does-not-fit-after-zooming-operation를 -uiinterfaceorienta/9035545 # 9035545 –
@ Naina Soni 나는 이것을 시도했지만, 항상 두 방향 모두 확대/축소를 수정하는 것으로 표시됩니다. –