1

これは私の質問です: www.aaa.com に POST リクエストを送信します。

NSString *post =[[NSString alloc] initWithFormat:@" bll bla ",importo];
NSURL *url=[NSURL URLWithString:@"http://www.aaa.com"];

NSLog(@"POST: %@",post); 
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding
    allowLossyConversion:YES];
... bla bla bla....
[request setHTTPBody:postData];
[request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
httpResponse = [[NSMutableString alloc] init];
NSURLConnection *connection = [[NSURLConnection alloc] 
    initWithRequest:request 
    delegate:self];
[connection release];

私は応答を受け取り、すべてOKです!しかし

- (void) connectionDidFinishLoading:(NSURLConnection *)connection

uiwebviewではなく、モバイルサファリで応答ページを開きたいのですが、おそらくアプローチを変更する必要があります。誰か提案がありますか?

4

1 に答える 1

0

SafariでURLを開きたい場合は、次のように呼び出します。

[[UIApplication sharedApplication] openURL: yourUrl];
于 2011-02-24T16:53:01.200 に答える