title: referencing views elements in xcode iphone programming
body: <p>I am trying to do something really simple, but I can't find any examples and can't figure out.
  I am coding in xcode 4 for iphone 5.</p>
  
  <p>I have 2 views on my storyboard. One has a button (ButtonFromFirstView) which leads to my second view. The second view has a picker view object and a "select" button. When I click "select" it takes me to my first view. And I would like the ButtonFromFirstView title to be the string selected in the picker from second view. How do I get what value was selected in the picker view?</p>
  
  <p>in my second view I have the following method which catches the changes in the picker. However ButtonFromFirstView is NOT available. How can I get to it? If the button is on the same view where picker is, that it works, but this is not what I want. </p>
  
  <pre><code>-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
      NSString *SelectedString = [DeparturePickerArray objectAtIndex:row];
      [ButtonFromFirstView setTitle:SelectedString forState:UIControlStateNormal];    
  }
  </code></pre>