title: iOS how to present a view, then rerun calling method with input from the view
body: <p>I'm working on an iOS app that uses a tab bar. An item is scanned using a barcode reader, and a callback method sets the tab bar item to the result view, then sends the request to the server. The callback from the server populates the display and the result view is shown.  </p>
  
  <p>However, under certain conditions which depend on the response from the server, I'd like show an alternate view which allows the user to manually enter the data, and then process the data in the same way as the callback. The manual entry display can't be shown on the tab bar. </p>
  
  <p>So I create a modal view and exit the callback: </p>
  
  <pre><code>EnterTextController* enterTextController = [[EnterTextController alloc]init];
  presentModalViewController:enterTextController animated:YES];
  return; 
  </code></pre>
  
  <p>In the view, I take the input and call the same process called by the callback: </p>
  
  <pre><code>NSLog(@"Button Clicked!");
  NSString *myText = myInput.text;
  
  [self dismissViewControllerAnimated:NO completion:nil];
  [self.mainViewController processMyText: myText];
  </code></pre>
  
  <p>The problem is the processMyText doesn't get executed. I have a breakpoint set and it never hits it. </p>
  
  <p>I'm sure I'm not going about this correctly. Any suggestions would be welcome.</p>