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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 12-16-2010, 04:51 AM   #1 (permalink)
Registered Member
 
jimmy's Avatar
 
Join Date: Aug 2010
Posts: 52
jimmy is on a distinguished road
Default UIWebView Help

[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.urLink]]];

here i am using NSString urlLink variable to pass the webaddress....i cant get the web site to load..is there some problem in the code.
jimmy is offline   Reply With Quote
Old 12-16-2010, 07:12 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

Quote:
Originally Posted by jimmy View Post
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.urLink]]];

here i am using NSString urlLink variable to pass the webaddress....i cant get the web site to load..is there some problem in the code.
the code is ok, nslog self.urLink to be sure that contain the link.

check that your UIWebView on IB is attached to your outlet webview
__________________
dany_dev is offline   Reply With Quote
Old 12-17-2010, 02:19 AM   #3 (permalink)
Registered Member
 
jimmy's Avatar
 
Join Date: Aug 2010
Posts: 52
jimmy is on a distinguished road
Default

Quote:
Originally Posted by dany88 View Post
the code is ok, nslog self.urLink to be sure that contain the link.

check that your UIWebView on IB is attached to your outlet webview
I have no issue when i pass the URL directly.
Like:
NSString *urLink = @"http:/www.google.com";

This works fine.So where is the mistake?any help
jimmy is offline   Reply With Quote
Old 12-18-2010, 04:07 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

so the problem is on your property, as said nslog it, and probably you will se that it have a problem.
__________________
dany_dev is offline   Reply With Quote
Old 12-19-2010, 10:33 AM   #5 (permalink)
Registered Member
 
jimmy's Avatar
 
Join Date: Aug 2010
Posts: 52
jimmy is on a distinguished road
Default

Danny i NSLog the link and was able to see the URL.but still the same problem with loading the URL.

I get null value when i NSLog the NSURL.

My Code:
NSURL *url = [NSURL URLWithString:link] ;
NSURLRequest *requestObj = [NSURLRequest requestWithURL:[loadHTMLString:url ];
[self.Webview loadRequest:requestObj];

Last edited by jimmy; 12-20-2010 at 04:36 AM.
jimmy is offline   Reply With Quote
Old 12-20-2010, 05:09 AM   #6 (permalink)
Registered Member
 
jimmy's Avatar
 
Join Date: Aug 2010
Posts: 52
jimmy is on a distinguished road
Default

NSURL *url = [NSURL fileURLWithPath:link1] ;

output:

%20http:/123abc.com/try_880.htm -- /


i am getting extra % and --/ symbol with this.
jimmy is offline   Reply With Quote
Old 12-21-2010, 01:07 AM   #7 (permalink)
Registered Member
 
jimmy's Avatar
 
Join Date: Aug 2010
Posts: 52
jimmy is on a distinguished road
Default

- (void)viewDidLoad {
[super viewDidLoad];

NSURL *url = [[NSURL alloc]init];
url = link1;
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

}

this way am able to load URL link to NSURL .Still i am not able to load the page in UIWebView.
jimmy is offline   Reply With Quote
Old 12-28-2010, 08:40 PM   #8 (permalink)
Registered Member
 
jimmy's Avatar
 
Join Date: Aug 2010
Posts: 52
jimmy is on a distinguished road
Default

Thanks Dany for the Help...everything works fine now.....i had a space before the URL so i wasnt able to load the URL....i removed the space and it works fine .......thanks again.....
jimmy is offline   Reply With Quote
Old 12-30-2010, 07:43 AM   #9 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

nice

ps: this problem is no so "advanced" (i mean the section )
__________________
dany_dev is offline   Reply With Quote
Reply

Bookmarks

Tags
nsurlrequest, uiwebview, url loading

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: 396
17 members and 379 guests
Brandt, coolman, fredidf, Free App Monster, givensur, iAppDeveloper, jbro, Kryckter, locombiano89, Mah6447, Meoz, simplymuzik3, SLIC, stanny, stevenkik, Tomsky, WeaselPig
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,646
Threads: 94,111
Posts: 402,862
Top Poster: BrianSlick (7,990)
Welcome to our newest member, locombiano89
Powered by vBadvanced CMPS v3.1.0

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