title: Trying to collect user info when iOS7 app launches and use that info to populate the main view
body: <p>I'm relatively new to iOS 7 and Objective-C programming, and I'm working on an app project, and when the app opens, I'd like to prompt the user for their name so I can then use that name to populate a label on the main screen in a single-view application.</p>
  
  <p>It seems like this would be easy to do, but I've been searching various combinations of terms here on Stack Overflow and elsewhere on the web, and I've not been able to find an answer that works in this context, and the Apple docs can be pretty opaque to a novice user.</p>
  
  <p>I've learned how to use UIAlertView to present a dialog with a text entry field using UIAlertViewStylePlainTextInput, so I am able to get information from the user.  However, the alert dialog is not modal, so program execution continues in the background.  As a result, by the time I fetch the user info, the view has already been populated with a blank value where I want the name to go.</p>
  
  <p>It's very possible UIAlertView may not be the right way to do this, so I am hoping someone can suggest a good way to do this.  The code I currently have is this:</p>
  
  <pre><code>UIAlertView *nameRequest = [[UIAlertView alloc] initWithTitle:@"Hello!" message:@"What is your name?" delegate:nil cancelButtonTitle:@"Let's Go!" otherButtonTitles: nil];
  [nameRequest setAlertViewStyle:UIAlertViewStylePlainTextInput];
  [nameRequest show];
  UITextField *name = [nameRequest textFieldAtIndex:0];
  </code></pre>