title: getDistanceFrom Vs distanceFromLocation
body: <p>I'm having a problem with getDistanceFrom and distanceFromLocation. getDistanceFrom is deprecated iOS 4.1 and distanceFromLocation is not available in 3.1.3, how do I get around this problem. </p>
  
  <p>Has anyone else come across this problem ?</p>
  
  <p>My code at the moment is:</p>
  
  <pre><code>CLLocationDistance kilometers;
          if ([currentLocation respondsToSelector: @selector(distanceFromLocation:)])
          {
              kilometers = [currentLocation distanceFromLocation:previousLocation] / 1000;
          }
          else
          {
              //kilometers = [currentLocation getDistanceFrom:previousLocation] / 1000;
              kilometers = [currentLocation performSelector: @selector(getDistanceFrom:) withObject: previousLocation] / 1000;
          }
  </code></pre>
  
  <p>Depending on which iOS I compile with I'm getting 'invalid operands to binary' on the lines:</p>
  
  <pre><code>kilometers = [currentLocation distanceFromLocation:previousLocation] / 1000;
              kilometers = [currentLocation performSelector: @selector(getDistanceFrom:) withObject: previousLocation] / 1000;
  </code></pre>
  
  <p>Regards,
  Stephen</p>