title: How to delay a method?
body: <p>I am working on an iPhone application. When the application starts I authenticate, establish a Restful connection, get data in form of XML file, parse it and then display it in form of table view. 
  Here is my problem.
  If the user information is already stored on the application or if it is hard-coded in  the code, the application takes the authentication user name and password and proceeds to display data in table format. I was till now testing with hard-coded data. Now I want to display another view which asks for user name and password if it is not present in the application..i.e. I want to make the user name and password dynamic as opposed to static. 
  In my case when the use is busy inputting the user name and password, the "viewDidLoad" method tries to establish a connection with the server with blank user name and password  failing the server connection and the table loading. But if I run the application the second time, the application finds the user name and password entered previously and loads the tables fine.</p>
  
  <p>Is there a way I can delay the process of server connection if the application does not find the user name and password?  How can I signal the server connection method after the user has entered his user name and password? </p>
  
  <p>Thanks for your help. </p>