title: IBAction float, have a equal different numbers depending on input
body: <p>New to objective-c and I just can't find the answer to this question anywhere. I'm running a IBAction for a calculation but I need the input from a label to actually equal something else in the equation.</p>
  
  <p>For example:</p>
  
  <pre><code>-(IBAction)calculate; {
    float a = 1.05 if ([label1.text] == 1in);
          a = 2.07 if ([label1.text] == 2in);
          a = 3.07 if ([label1.text] == 3in);
    float b = a*([textField1.text floatValue]);
          label2.text = [[NSString alloc] initWithFormat:@"%2.f", b];
    }
  </code></pre>
  
  <p>I know I'm not even close to getting it right but I hope you get the idea as to what I'm looking for.</p>
  
  <p>Thank you!</p>