Hey Guys,
I'm having a bit of an issue trying to figure out what the proper method is to refresh a a UIWebView when it is one of the Tabs on my Tab Bar (the reason why I suspect this is important to denote is because the view is not getting pushed).
I've got a few tabs, and a tab bar controller all nicely set up.
In 2 of the tabs I have 2 corresponding ViewControllers with WebViews done in in IB, everything is hooked up and works fine.
What I'd like to happen is whenever they flip back and forth between tabs, is for the page to be reloaded whenever that tab is selected.
So I did this...
I created the
Code:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:(BOOL)animated];
[busSchedule reload];
}
and invoked the reload method on the WebView, unfortunately...no dice.
I've also tried a variety of other methods with no luck either.
The UIWebView is loaded in viewDidLoad as such...
Code:
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *urlAddress = @"http://assets.strose.edu/mobileweb/shuttleschedule/default.aspx";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[busSchedule loadRequest:requestObj];
}
So I the question is, how exactly do I get this behavior to happen?
Thanks,
Justin