Hi guys I’m trying to load an html page, and after the loading I want to be executed change.php?lang=eng.
I have this now when the program starts:
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Treviturismo.it";
link = @"http://www.treviturismo.it/dev/index.php";
NSURL *url = [NSURL URLWithString:link];
NSURLRequest *requestObj=[NSURLRequest requestWithURL:url];
[myWebView loadRequest:requestObj];
}
Maybe I can do an IF to check if the page has been loaded, then:
link = @"http://www.treviturismo.it/dev/change.php?lang=en";
NSURL *url = [NSURL URLWithString:link];
requestObj=[NSURLRequest requestWithURL:url];
[myWebView loadRequest:requestObj];
Is this a good way?? I don’t know what to type in the if(), to check if the first page has been loaded!
Can anyone help me?
thanks!
You should listen for the page loading event using the
UIWebViewDelegateprotocol.