現在、私はiPhoneアプリケーションで作業しており、UIWebviewを使用して「アメリカ」などのアドレスをロードしてから、アプリケーションを実行します。マップは画面に表示されません。ユーザー入力検索バーフィールドから場所を表示したいのですが、この問題を修正するにはどうすればよいですか?私を助けてください
前もって感謝します
私はこれを試しました:
webView=[[UIWebView alloc]initWithFrame:CGRectMake(0, 40, 320,376)];
webView.delegate=self;
webView.scalesPageToFit=YES;
NSString *mapurl = @"http://maps.google.com/maps?q=";
NSString *urlString1 = [mapurl stringByAppendingFormat:@"America"];
NSString *OmitSpace = [urlString1 stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
NSURL *url=[NSURL URLWithString:OmitSpace];
NSURLRequest *requestObj=[NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
スクリーンショット: