問題はおそらく HTML にあります。ページには content="width=device-width" が設定されており、uiWebView のコンテンツ サイズをデバイスのサイズとビューのサイズに設定します。
UIPopoverController内のUIWebViewでWikiモバイルページを表示するこの質問に対する2番目の回答をチェックアウトしてください
それは私の問題を修正しました コードは以下の通りです
- (void)webViewDidFinishLoad:(UIWebView *)aWebView {
if(aWebView.frame.size.width < aWebView.window.frame.size.width) {
// width=device-width results in a wrong viewport dimension for webpages displayed in a popover
NSString *jsCmd = @"var viewport = document.querySelector('meta[name=viewport]');";
jsCmd = [jsCmd stringByAppendingFormat:@"viewport.setAttribute('content', 'width=%i, initial-scale=1.0, user-scalable=1');", (NSUInteger)aWebView.frame.size.width];
[aWebView stringByEvaluatingJavaScriptFromString:jsCmd];
}
// stop network indicator
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}