0

我正在开发一个 Ipad 应用程序我正在尝试使用 Webview 但无法在 webview 中打开 URL 我正在使用以下代码

NSURL *fileURL = [[[NSURL alloc] initWithString:@"http://www.google.com/"] autorelease];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:fileURL];
[webview loadRequest:requestObj];

此代码适用于 Iphone 应用程序不适用于 Ipad 应用程序。有什么问题吗。

谢谢阿米特巴坦

4

1 回答 1

0

你初始化 webView 对象了吗?

webView = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,100,100)];
于 2010-10-25T06:29:08.550 回答