views:

577

answers:

3

I am new to Iphone App develoment and I was wondering how to insert a welcome screen when my app first start up. The app is primarily navigation based. There are tables that users can drill down and see a characteristic of the item that they selected. I want there to be a welcome screen that gives two options. But I don't want this to look like a table. I would prefer a background image and two rounded rect buttons that link to my tables. Is this possible? If so, how?

+2  A: 

Briefly, create a UIView with two UIButton's within it...

Set the background image with

view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]];

I'd suggest you spend some time reading/watching tutorials on http://developer.apple.com/iphone to get some basics concepts.

Grumdrig
+3  A: 

You should add a Default.png. This gets shown as your app is loading. Just add it to your project and you have a splash screen. Easy-peasy.

Read the HIG (Human Interface Guidelines) for more info. (Reading the HIG will also smooth over the review process, you're less likely to offend Apple if you follow their rules.)

Frank Krueger
I don't think he means a Default.png image. I think he means an initial view that the user sees when the app first starts.
Alex
It seems you're right.
Frank Krueger
You could still use a Default.png, and then once you get to applicationDidFinishLaunching, use the same Default.png in a UIImageView with two buttons added. That way you have a more seamless transition.
mahboudz
+2  A: 

First you should define a new ViewController backed by a XIB (let's call it WelcomeController). Layout the UI however you want (add two Round Rect buttons). Set the background color as @Grumdrig suggested or use a large ImageView as background.

Then, wherever it is that you add the UINavigationController to your window, instead add an instance of your WelcomeController.

To dismiss the WelcomeController, simply remove its view from the superview, and insert the NavigationController.

Frank Krueger