title: How can i get UIPickerview to update UILabel automatically
body: <p>I have a converter app, and i want it to update the label whenever im typing the numbers (that should be converted) into the text field. I want it to update automatically so i dont need to pick the units on the wheel again for it to update. </p>
  
  <p><img src="https://i.stack.imgur.com/cF0eR.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/Q8xLx.png" alt="enter image description here"></p>
  
  <p>here is my code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
     [super viewDidLoad];
    {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
      _convertFrom = @[@"MTPA", @"MMcf/day",
      @"Mill.Sm3/day", @"MMBTU", @"Boe/day"];
  
      _convertRates = @[ @1.0f, @133.4246575f, @3.780821918f,
      @142465.7534f, @23780.8f];
  
      _convertTo = @[@"MTPA", @"MMcf/day",
      @"Mill.Sm3/day", @"MMBTU", @"Boe/day"];
  
      _convertRates = @[ @1.0f, @133.4246575f, @3.780821918f,
      @142465.7534f, @23780.8f];
  }
  }
  </code></pre>
  
  <p>shuold i do something here?</p>
  
  <pre><code>- (void)didReceiveMemoryWarning
  {
  [super didReceiveMemoryWarning];
  </code></pre>
  
  <p>}</p>
  
  <pre><code>-(IBAction)textFieldReturn:(id)sender
  {
      [sender resignFirstResponder];
  }
  -(IBAction)backgroundTouched:(id)sender
  {
      [inputText resignFirstResponder];
  }
  
  
  #pragma mark -
  #pragma mark PickerView DataSource
  
   - (NSInteger)numberOfComponentsInPickerView:
  (UIPickerView *)pickerView
  {
  return 2;
  }
  
   - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:      (NSInteger)component
    {
   if (component == 0)  {
      return [_convertFrom count];
  }
  return [_convertTo count];
  }
  
  
   - (NSString *) pickerView: (UIPickerView *)pickerView
            titleForRow:(NSInteger)row
           forComponent:(NSInteger)component
  {
  if (component == 0) {
      return [_convertFrom objectAtIndex:row];
  }
  return [_convertTo objectAtIndex:row];
  }
  
  
  
  
   #pragma mark -
   #pragma mark PickerView Delegate
   -(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row
     inComponent:(NSInteger)component
  
   {
   float convertFrom = [[_convertRates objectAtIndex:[pickerView selectedRowInComponent:0]]     floatValue];
   float convertTo = [[_convertRates objectAtIndex:[pickerView selectedRowInComponent:1]] floatValue];
  
  float input = [inputText.text floatValue];
  float to = convertTo;
  float from = convertFrom;
  float convertValue = input;
  float relative = to / from;
  float result = relative * convertValue;
  NSString *convertFromName = [_convertFrom objectAtIndex:[pickerView selectedRowInComponent:0]];
  NSString *convertToName = [_convertFrom objectAtIndex:[pickerView selectedRowInComponent:1]];
  
  
  NSString *resultString = [[NSString alloc]initWithFormat:
                            @" %.4f %@ = %.4f %@",convertValue, convertFromName, result, convertToName];
  resultLabel.text = resultString; 
  
  
  
  }
  </code></pre>