views:

97

answers:

2

Hello.

I'm developing an iPhone application and I'm trying to do this:

I want an application with tree views. The view shown first, doesn't have a navigation bar. If the user tap on a button, I need to open the second view with a navigation bar and a table view. The user can also add new items to the table view. If the user do so, the application will show the third view where the user can add fields (this view has also a navigation bar).

It may seem simple, but for me it is not. I don't know how to use the UINavigationController and have not found yet a similar example for what I do (paragraph translated by google).

UPDATE

I don't know how where to put UINavigationController.

How can I do that? Can I use a UIViewController to call a UINavigationController?

Thank you.

+2  A: 

take a look at the Recipes example (it also uses core data which may confuse things a little) http://developer.apple.com/iphone/library/samplecode/iPhoneCoreDataRecipes/Introduction/Intro.html#//apple_ref/doc/uid/DTS40008913

There is also a simpler starting point here http://developer.apple.com/iphone/library/samplecode/TableViewSuite/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007318 but the Recipe example covers just about everything you need.

EDIT:added the following For the very simplest example use XCode to build a new application - a navigation based application (sorry, I'm in front of a PC today so that is from memory). That will give you a blank application with the navigation controller created. You then use the navigation controller to push and pop your view controllers

Andiih
+1 for the ViewController Programming Guide answer too!
Andiih
+1  A: 

ViewController Programming Guide

RickiG
May you can improve your answer. I've reviewed my question and there isn't anything about copy-wasting and neither about finding magical ways of doing it. I put in bold this: I don't know how to use the UINavigationController. And this is the important thing.
VansFannel
You are welcome to ignore everything in my answer but the link.The guide takes you through each area of the UIViewController and there is a chapter on the UINavigationController, this chapter goes into everything you need to know. Apples documentation takes a bit of getting used to, but the "Programming guides" they have for each subject are very good and for everyone.If you don't know where to start out, the guide will help you. Andiih's links are also good reading when you read up on the basics.
RickiG
I'm reading this: http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/CombiningViewControllers/CombiningViewControllers.html#//apple_ref/doc/uid/TP40007457-CH104-SW1 . Thank you for your answer.
VansFannel