UIPopoverController内のUIWebViewでwikiモバイルバージョンのWebページを開こうとします。私のcontentSizeForViewInPopover、または単にUIWebViewフレームを設定する方法に関係なく、または単にUIWebView.scalesPageToFit = YESを設定することに問題はありません。 Wikiモバイルのバージョンページのコンテンツサイズが私のUIWebViewよりも大きいようです。しかし、もし私がiPhone上でそれを使用しても、そのような問題はありません。ここでポップオーバーコントローラのための私のコードは次のとおりです。UIPopoverController内のUIWebViewのWikiモバイルページを表示
//create a UIWebView UIViewController first
WikiViewController *addView = [[WikiViewController alloc] init];
addView.contentSizeForViewInPopover = CGSizeMake(320.0, 480.0f);
//then create my UIPopoverController
popover = [[UIPopoverController alloc] initWithContentViewController:addView];
popover.delegate = self;
[addView release];
//then get the popover rect
CGPoint pointforPop = [self.mapView convertCoordinate:selectAnnotationCord
toPointToView:self.mapView];
CGRect askRect = CGRectMake((int)pointforPop.x, (int)pointforPop.y+10, 1.0, 1.0);
[popover presentPopoverFromRect:askRect
inView:self.mapView
permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES];
[self.mapView deselectAnnotation:annotation animated:YES];
、これはのUIWebViewを作成する上で、私のコードです:
- (void)viewDidLoad
{
wikiWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];
wikiWebView.scalesPageToFit = YES;
//or No, doesn't matter, it all get larger than this
wikiWebView.delegate = self;
self.view = wikiWebView;
}
すべてのコードは、誰もが私にいくつかの光を当てることができれば が、私は疑問に思う...典型的であるように見えます、どうもありがとうございます。