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-05-2008, 08:00 PM   #1 (permalink)
Registered Member
 
Marco's Avatar
 
Join Date: Apr 2008
Posts: 69
Default UIWebView how to reload page every time

I am using the UIWebView from IB into a UIViewController.

I have the load the UIWebView with below code:

Code:
- (void)viewDidLoad {
	NSURL *theURL = [NSURL URLWithString:@"http://www.OurLovingMother.org/Mobile.aspx"];
	[webView loadRequest:[NSURLRequest requestWithURL:theURL]];
}
I have tried to add [webView reload]; also above but the view does not refresh. The UIWebView always shows the previous viewed portion of the web page.

Any ideas?
__________________
Peace in Christ
Marco Napoli
http://www.ourlovingmother.org
Marco is offline   Reply With Quote
Old 07-06-2008, 01:38 AM   #2 (permalink)
Registered Member
 
Marco's Avatar
 
Join Date: Apr 2008
Posts: 69
Default Re: UIWebView how to reload page every time

I moved the code in the - (void)viewWillAppearBOOL)animated {} and its now refreshing the page every time. I am assuming this is the best way of doing this?
__________________
Peace in Christ
Marco Napoli
http://www.ourlovingmother.org
Marco is offline   Reply With Quote
Old 10-10-2010, 06:37 PM   #3 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 1
Default A better way

Quote:
Originally Posted by Marco View Post
I moved the code in the - (void)viewWillAppearBOOL)animated {} and its now refreshing the page every time. I am assuming this is the best way of doing this?
A slightly better way is to use:

- (void)viewWillAppearBOOL)animated {
[webView reload];
... //if you assign delegate, make sure it's after reload line.
}
JosephTheTechie is offline   Reply With Quote
Reply

Bookmarks

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Posting an image from iPhone to php page via POST ddavtian iPhone SDK Development 4 09-07-2008 09:08 PM
web page search nownot iPhone SDK Development 0 07-04-2008 01:30 PM
date time conversion WayneDavidDaley iPhone SDK Development 2 07-01-2008 07:32 PM
Pulling Data From A Web Page CoffeeKid iPhone SDK Development 8 04-17-2008 12:43 PM


» Advertisements
» Online Users: 248
17 members and 231 guests
ADY, Alsahir, Dani77, Desert Diva, Duncan C, F_Bryant, Grinarn, HemiMG, Herbie, jansan, linkmx, M@realobjects, macquitzon216, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,761
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

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