-(IBAction)openWeb{
NSString *urlText = [ [ NSString stringWithFormat:@"http://ditu.google.cn/"];
[ [ UIApplication sharedApplication] openURL:[ NSURL urlWithString:urlText];
}
-(IBAction)openWeb{
NSString *addressText = @"tian an men,bei jing,China";
addressText = [ addressText stringByAddingpercentEscapesUsingEncoding:NSASCIIStringEncoding];
NSString *urlText = [ NSString stringWithFormat:@"http://maps.google.com/maps?q = %@",addressText];
webView.userInteractionEnabled = true;
[webView loadRequest:[ [ NSURLRequest alloc] initWithURL:[ [ NSURL alloc] initWithString:urlText] ] ];
}
作者:qingsi00 发表于2013-1-16 23:29:51 原文链接
阅读:89 评论:0 查看评论