自从升级到 Xcode 4.2 后,当我改变方向时,Web View 无法正确缩放
我使用这个代码:
NSLog(@"Show link: %@",URL);
[showStory loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:URL]]];
showStory.scalesPageToFit = YES;
showStory.contentMode = UIViewContentModeScaleAspectFit;
但是当我切换到横向模式时会发生这种情况。有什么建议吗?
Try this
webView.scalesPageToFit = YES;
webView.contentMode = UIViewContentModeScaleToFill;
webView.multipleTouchEnabled = YES;
webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:webView];
关于iOS:切换到横向模式时 Webview 不缩放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9041880/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |