views:

51

answers:

1

Hi!

I need some advice about how should I start coding something.

So here is the context: I've just finished building a CMS that manage a SQLite database. My application will be picking this database and use its content as the application's content. So far it's pretty simple.

The application will have a navigation that will browse through various workflows, and once at the end workflow, it'll show contents from the database. A consultation kind a thing, example: Liquids -> Juice -> Orange Juice -> Informations about Orange Juice.

For my SQLite transactions, so far I believe I'll be using fmdb. It looks like a great wrapper.

Here's a simple schema from one of the database:

Workflow:
    id:                  { type: integer(3), primary: true, autoincrement: true }
    workflow_id:         { type: integer(1) }
    name:                { type: string(255) }

That table's rows will be my navigations. Do you believe I should use a navigation controller? If so, then how could I generate the navigation tree from it?

I have a good working knowledge of Objective-C and Foundation framework, but never went too far with it so that is why I'm asking before starting in the wrong direction :)

Thanks a lot.

+2  A: 

Yes, the standard way to do this sort of thing on the iPhone is to use a UINavigationController which pushes UIViewController or UITableViewController subclasses (see Apple's view controller programming guide for more information). In your case, each workflow would probably be a UITableViewController which displays a list of sub-workflows, and each table cell would use UINavigationController's -(void)pushViewController:animated: to push the next level. Hope that helps.

eman