views:

129

answers:

1

Some one please help me with this. I am developing an iPhone app and have stared with View Based Application. I have buttons on my root view screen to take user to other views with their own nibs and classes. On one of those views I need to display a table getting data from SQLite database and then display detail of the selected item depending on the selection from the table. At later stage I also need to add forms to add data.

Now, how to add a Navigation Controller in that view for drill down? Can we convert a View Controller to Navigation Controller just by adding a Navigation bar at the top?

A: 

I'm having the exact same problem...my app is similar to yours too... at this point i can see the data entered in my sqlite database file in a table in the subview after the button in my main view is clicked...but no navigation bar at the top and no drill down....I'm using this code to pull up my subview with the table in it.

  • (IBAction) PasswordsButtonClick:(id) sender { NSLog(@"Passwords button was clicked!");

    // this view will set our model data PasswordsViewController *passController = [[PasswordsViewController alloc] init];

    [self presentModalViewController:passController animated:NO];

    [passController release]; //release the memory }

i have a navigation controller in my nib file....can't think of anything at this point....any ideas???

Also i used this link to figure out a way to connect to my database and display it....hope it helps

http://www.iphonesdkarticles.com/2008/10/sqlite-tutorial-selecting-data.html

Ali