title: How to convert type double to string iPhone?
body: <p>I am calculating the velocity of an iPhone, and I need to know how to convert the variable calculatedSpeed which is type double to type string to display on a label.</p>
  
  <p>Here is what I have in the header:</p>
  
  <pre><code>@interface myProject : UIViewController &lt;CLLocationManagerDelegate&gt; {
  
  double calculatedSpeed; 
      UILabel *velocityLabel;
  }
  </code></pre>
  
  <p>And here is what I have in the main:</p>
  
  <pre><code>-(void)speedLocation:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
  {
  double gpsSpeed = newLocation.speed;
  
  if(oldLocation != nil)
  {
      CLLocationDistance distanceChange = [newLocation getDistanceFrom:oldLocation];
      NSTimeInterval sinceLastUpdate = [newLocation.timestamp timeIntervalSinceDate:oldLocation.timestamp];
      calculatedSpeed = distanceChange / sinceLastUpdate;
  
      velocityLabel.text = calculatedSpeed;
  
  }
  
  }
  </code></pre>
  
  <p>Notice how I am trying to set velocityLabel to calculatedSpeed, which is a variable with the type double. So it naturally gives me the error: incompatible type for argument 1 of 'setText:'. </p>
  
  <p>Your help is greatly appreciated.</p>
  
  <p>Thanks!</p>