2011-05-27 88 views
0

我加載UIWebView中使用此代碼:的UIWebView中不顯示URL

NSString *[email protected]"http://www.google.com/"; 
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:a]]; 
[aWebView loadRequest:theRequest]; 

但沒有被加載?我做錯了什麼?

請幫我

+0

請張貼的代碼中添加aWebView一些其他可見的子視圖視圖。 – Rayfleck 2011-05-27 13:43:35

+2

+1好的潛意識廣告 – oliholz 2011-05-27 13:44:02

+0

你應該真的考慮制定一個問題。 – marzapower 2011-05-27 15:11:36

回答

0

試試這個代碼可以幫助............

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(50, 100, 690, 750)]; 
//webView.delegate=self;  
NSString *urlAddress = @"http://www.google.com/"; 
NSURL *url = [NSURL URLWithString:urlAddress]; 
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; 
[webView loadRequest:requestObj]; 
[self.view addSubview:webView];