UIWebView comparing current and defined URL's with a loop depending on result

Posted by Syleron on Stack Overflow See other posts from Stack Overflow or by Syleron
Published on 2010-04-22T08:09:31Z Indexed on 2010/04/22 8:13 UTC
Read the original article Hit count: 213

I am trying to compare the current url in webView with a defined url say google.com

so in theory..

 NSURLRequest *currentRequest = [webView request];
 NSURL *currentURL = [currentRequest URL];

would give us our current url...

  NSString *newurl = @"http://www.google.com";

this would give us the compared to defined url

 while (!currentURL == newurl) {
  //do whatever here because currentURL does not equal the newurl
 }

This does not seem to work though.. solutions?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone-sdk