title: UITextField to Float
body: <p>I Have a textfield and I need the user to put a number in there, this number I need to transform into a float value and take it to another view. I can't find my error... Xcode says it is on the "<code>float valor = [[_inserir.text ] floatvalue];</code>"line. If somebody could find where is my error, thanks.</p>
  
  <p>first view .h:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface CedulasFirstViewController : UIViewController
  @property (strong, nonatomic) IBOutlet UITextField *inserir;
  - (IBAction)calc:(id)sender;
  
  @end
  </code></pre>
  
  <p>first view .m:  (the underline before my variable name, xcode put it by itself, taking it out doesn't change anything)</p>
  
  <pre><code>#import "CedulasFirstViewController.h"
  #import "CedulasSecondViewController.h"
  
  @interface CedulasFirstViewController ()
  
  @end
  
  @implementation CedulasFirstViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  - (IBAction)calc:(id)sender {
  
      float valor = [[_inserir.text ] floatvalue];
  
      CedulasSecondViewController *second [[[CedulasSecondViewController alloc] init]];
  
      second.valor = self.valor;
  
  }
  @end
  </code></pre>
  
  <p>second view .h:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface CedulasSecondViewController : UIViewController{
  
  
  }
  
  @end
  </code></pre>
  
  <p>second view .m:</p>
  
  <pre><code>#import "CedulasSecondViewController.h"
  
  @interface CedulasSecondViewController ()
  
  @end
  
  @implementation CedulasSecondViewController
  
  - (void)viewDidLoad
  {
  
      NSString *numberFromTF [[NSString alloc] initWithFormat:@"%.2f", valor];
  
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  @end
  </code></pre>
  
  <p>Thanks</p>
  
  <p>EDIT: </p>
  
  <p>if someone could explain me why xcode says to put this underline before the variable</p>