打开网站Url连接
-(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] ] ];
}
补充:综合编程 , 其他综合 ,