views:

115

answers:

1

Hi! I'm a relative newbie on iPhone app development but have successfully created a tab bar app with 4 tab bar items. I would like to have a one-off registration page for users to key-in information when they open the application for the first time. The registration page should load before the view with the selection of tab bar items loads.

What is the best way to do this? Also, how do I load a UIView or UIWebView before the tab bar items load? Any suggestions and sample code would be very much appreciated - thanks!

A: 

What I've done for things like this is create the tab bar controller as the main controller for your app as if you didn't have the registration page. Then in the viewdidload, check to see if the registration information has been collected (in a p-list, keychain, db, or however you're storing it). If it has, proceed as usual. If it has not (the first time the app is launched), then present a modal view to the user with some code like this:

modalView *m = [[modalView alloc] initWithNibName:@"modalView" bundle:nil];
[self presentModalViewController:m animated:YES];
[m release];

With modalView being the name of my UIView or UIWebView. Hope that helps!

Gorgando
Thanks for the answer. I got modal view part earlier - will try the info collection bit soon. Thanks again!
leeks