Reputation: 1934
How can I do an if statement to check if UIWebView is displaying a certain page or not?
Thanks,
James
Upvotes: 0
Views: 379
Reputation: 48398
currentURL = webView.request.URL.absoluteString;
NSLog(@"%@",([currentURL isEqualToString:desiredURL] ? @"YES" : @"NO")];
Upvotes: 1
Reputation: 30765
You could try using the url property of the request - see SO for an example But I'm not sure how you could handle different encodings of the same URL or IP addresses instead of FQDN's.
Upvotes: 1