12-16-2010, 04:51 AM
#1 (permalink )
Registered Member
Join Date: Aug 2010
Posts: 52
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.
12-16-2010, 07:12 AM
#2 (permalink )
Nuisance Developer
Join Date: Jul 2009
Location: Italy
Posts: 4,691
Quote:
Originally Posted by
jimmy
[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
__________________
12-17-2010, 02:19 AM
#3 (permalink )
Registered Member
Join Date: Aug 2010
Posts: 52
Quote:
Originally Posted by
dany88
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
12-18-2010, 04:07 AM
#4 (permalink )
Nuisance Developer
Join Date: Jul 2009
Location: Italy
Posts: 4,691
so the problem is on your property, as said nslog it, and probably you will se that it have a problem.
__________________
12-19-2010, 10:33 AM
#5 (permalink )
Registered Member
Join Date: Aug 2010
Posts: 52
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 .
12-20-2010, 05:09 AM
#6 (permalink )
Registered Member
Join Date: Aug 2010
Posts: 52
NSURL *url = [NSURL fileURLWithPath:link1] ;
output:
%20http:/123abc.com/try_880.htm -- /
i am getting extra % and --/ symbol with this.
12-21-2010, 01:07 AM
#7 (permalink )
Registered Member
Join Date: Aug 2010
Posts: 52
- (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.
12-28-2010, 08:40 PM
#8 (permalink )
Registered Member
Join Date: Aug 2010
Posts: 52
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.....
12-30-2010, 07:43 AM
#9 (permalink )
Nuisance Developer
Join Date: Jul 2009
Location: Italy
Posts: 4,691
nice
ps: this problem is no so "advanced" (i mean the section
)
__________________
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
» 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