title: String to float in objective c
body: <p>I have a parser returning some string value I'd like to use as parameter for my class instance initialisation.</p>
  
  <p>I have a method asking two NSString and a float value, but I can't convert the string to float, here is my code:</p>
  
  <pre><code> NSString *from = [[NSString alloc] initWithString:@"EUR"];
      NSString *to = [[NSString alloc] initWithString:[attributeDict objectForKey:@"currency"]];
      NSNumber *rate = [[NSNumber alloc] initWithFloat:[[attributeDict objectForKey:@"rate"] doubleValue]];
  
  
     currency = [[Currency init] alloc];
     [currency addCurrencyWithFrom:from andTo:to andRate:rate];
  </code></pre>
  
  <p>in the .h</p>
  
  <pre><code>- (id) addCurrencyWithFrom: (NSString *) from_ andTo:(NSString *) to_ andRate:(float *) float_;
  </code></pre>