title: Valueforkey in NSUserDefaults
body: <p>I am new to IOS programming and am trying to modify some code a developer wrote for me. I'm having problems in the following code </p>
  
  <pre><code>NSUserDefaults *pref=[NSUserDefaults standardUserDefaults];
  NSString *strUrl=[pref valueForKey:@"HistoryUrl"];
  
  if (strUrl.length&gt;0)
  {
      newUrl=strUrl;
  
  }
  else
  {
      newUrl=@"http://www.google.com";
  }
  </code></pre>
  
  <p>The HistoryUrl parameter seems to have the value '<a href="http://www.yahoo.com" rel="nofollow">http://www.yahoo.com</a>' stored in it. I've looked everywhere and searched the net on how to replace this value to google's address. I have even gone through all the code in XCode and can't find where historyurl is declared:</p>
  
  <ol>
  <li>Where is HistoryUrl declared?</li>
  <li>How can it be modified?</li>
  </ol>
  
  <p>Thanks in advance!</p>