title: Storyboard - Open view programmatically
body: <p>I am currently building an Iphone app that is using storyboards.  I know how to open new views with buttons via the ctrl+click method etc.  The problem I have is that when the user clicks the button, I need to do some calculations and processing, as well as opening a web connection to pull data so I can populate the table in the next view but the view opens first before I can do any of this.</p>
  
  <p>What I'm running into is the view is loading long before I am finished connecting to the web service and have calculated and stored the data for the table in the next view, so it loads blank.  I need to either call the view in the button programmatically or somehow slow down the processes with some kind of "loading" screen but don't know how to do either.  I guess if its possible to fill the data in the table after the view loads, that could work as well. (if its possible)</p>
  
  <p>Any tips or articles that can point me in the right direction would be appreciated.  I haven't found anything myself.</p>
  
  <p>Thanks.</p>
  
  <p>--connect method--</p>
  
  <pre><code>- (IBAction)connect:(id)sender {
  //First begin by logging into the web service.
  
  _email = self.logintxt.text;
  
  //                            ---SOAP 1.1---
  //large soap creation.  edited for privacy etc.
  NSString *soapMsg = 
  [NSString stringWithFormat:@"",_logintxt.text
   ];
  
  //---print it to the Debugger Console for verification---
  //NSLog(soapMsg);
  
  NSURL *url = [NSURL URLWithString: 
                @""];
  NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];
  
  //---set the headers---
  NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMsg length]];
  
  [req addValue:@"" forHTTPHeaderField:@"Host"];
  [req addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
  [req addValue:@"" forHTTPHeaderField:@"SOAPAction"];
  [req addValue:msgLength forHTTPHeaderField:@"Content-Length"];
  
  //---set the HTTP method and body---
  [req setHTTPMethod:@"POST"];
  [req setHTTPBody: [soapMsg dataUsingEncoding:NSUTF8StringEncoding]];
  
  
  
  NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:req delegate:self];
  if (conn) {
      XMLData = [NSMutableData data];     
  }
  
  
  [self performSelector:@selector(getXMLList) withObject:NULL afterDelay:2.0];
  [self performSegueWithIdentifier:@"LoginSegue" sender:sender];
  </code></pre>