【发布时间】:2011-05-26 04:14:57
【问题描述】:
我想在我的 webView 中打开一个 iTunes 链接,但是当 webView 启动页面时,它会重定向到 Safari 浏览器。在那里,网址正在打开,但我希望它在我的 webView 中打开。
- (void)viewDidLoad {
NSString *urlAddress = @"http://itunes.apple.com/us/app/foodcheck-traffic-light-nutrition/id386368933?mt=8";
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[webView loadRequest:requestObj];
[super viewDidLoad];
}
请提出解决此问题的方法。
【问题讨论】:
标签: iphone objective-c uiwebview