Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-20-2009, 12:08 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2009
Location: Montreal, QC
Posts: 16
Unhappy UIWebView not loading webpage

Hello...
I'm trying to get a webpage to load inside of my application but the page never seems to load.

I am loading my webView controller when the user select a row from my tableView

I have the view loading and my title is changin according to my script but i don't know whta i'm missing to make the webpage load in my UIWebView.

here is the code i've got...
Code:
Item *item = (Item *)[blogEntries objectAtIndex:indexPath.row];
NSString *itemLink = @"http://www.google.ca";
	
NSURL *url = [NSURL URLWithString:itemLink];
NSURLRequest *requestUrl = [NSURLRequest requestWithURL:url];

NSString *itemName = item.title;
	
WebViewController *webView = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:nil];
	
webView.title = itemName;
[webView.webPage loadRequest:requestUrl];

[self.navigationController pushViewController:webView animated:TRUE];
[webView release];
I've checked in teh debugger and all my variable are set properly but still all i get a white screeen that i can scroll but there is nothign there to scroll, no webpage...

Any help anyone can provide is greatly apreciated...
simply07 is offline   Reply With Quote
Old 07-20-2009, 04:18 PM   #2 (permalink)
iphone girl
iPhone Dev SDK Supporter
 
Alina's Avatar
 
Join Date: Jul 2009
Location: France/Romania
Posts: 24
Send a message via MSN to Alina
Default

Quote:
Originally Posted by simply07 View Post
Hello...
I'm trying to get a webpage to load inside of my application but the page never seems to load.

I am loading my webView controller when the user select a row from my tableView

I have the view loading and my title is changin according to my script but i don't know whta i'm missing to make the webpage load in my UIWebView.

here is the code i've got...
Code:
Item *item = (Item *)[blogEntries objectAtIndex:indexPath.row];
NSString *itemLink = @"http://www.google.ca";
	
NSURL *url = [NSURL URLWithString:itemLink];
NSURLRequest *requestUrl = [NSURLRequest requestWithURL:url];

NSString *itemName = item.title;
	
WebViewController *webView = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:nil];
	
webView.title = itemName;
[webView.webPage loadRequest:requestUrl];

[self.navigationController pushViewController:webView animated:TRUE];
[webView release];
I've checked in teh debugger and all my variable are set properly but still all i get a white screeen that i can scroll but there is nothign there to scroll, no webpage...

Any help anyone can provide is greatly apreciated...
[webView loadRequest:[[NSURLrequest alloc] initWithUrl:[[NSURL alloc] initWithString:@"http://www.google.ca"]]];
__________________
I'm not Blond
Alina is offline   Reply With Quote
Old 07-20-2009, 05:12 PM   #3 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 7
Default

Quote:
Originally Posted by simply07 View Post
Hello...
I'm trying to get a webpage to load inside of my application but the page never seems to load.

I am loading my webView controller when the user select a row from my tableView

I have the view loading and my title is changin according to my script but i don't know whta i'm missing to make the webpage load in my UIWebView.

here is the code i've got...
Code:
Item *item = (Item *)[blogEntries objectAtIndex:indexPath.row];
NSString *itemLink = @"http://www.google.ca";
	
NSURL *url = [NSURL URLWithString:itemLink];
NSURLRequest *requestUrl = [NSURLRequest requestWithURL:url];

NSString *itemName = item.title;
	
WebViewController *webView = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:nil];
	
webView.title = itemName;
[webView.webPage loadRequest:requestUrl];

[self.navigationController pushViewController:webView animated:TRUE];
[webView release];
I've checked in teh debugger and all my variable are set properly but still all i get a white screeen that i can scroll but there is nothign there to scroll, no webpage...

Any help anyone can provide is greatly apreciated...
why not just put your loadRequest in your WebViewController.m file?
khoogheem is offline   Reply With Quote
Reply

Bookmarks

Tags
subview, uiwebview, viewcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 333
21 members and 312 guests
@sandris, ADY, BrianSlick, dacapo, Dani77, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:09 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0