title: Reference to calling viewcontroller / Method depending on type of calling view controller
body: <p>I have a view controller, that is called from several other view controllers. This view controller contains a UITextField, which collects different information, depending on which view controller has called it.
  The information has to be stored after it was collected. To be as independent as possible, the method to store the information should be located in the calling view controller. 
  Thus, I use the following code in the method to collect the information:</p>
  
  <pre><code>- (void) collectContent
  {
      NSString *info = [textField text];
      [textField resignFirstResponder];
  
      [[NSNotificationCenter defaultCenter] postNotificationName:@"NewValueA" object:info];
  
      [[self navigationController] popToRootViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>In the calling view controller, I have the following line in its init method:</p>
  
  <pre><code>- (id) init
  {
      ...
      if (self)
      {
          ...
          [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(storeNewValueA) name:"NewValueA" object:nil];
      }
  return self;
  }
  </code></pre>
  
  <p>But now, I want to use this view controller from another view controller, to collect ValueB or ValueC. How do I reference the calling view controller to call a method for storing the collected value just there? I want to decide, that if the view controller was called from vcB, the entered value must have been valueB, an so on...</p>