views:

118

answers:

2

Hi, I 'm a iphone programming newbie. I m trying to implement an app with multi-level tableviews.

The idea is if someone selects something on the first screen say then a new view opens(tableview)

  car make> list of models   
  Honda > Acura, S2000,accord ...

My challenge is to show the list of models in a new tableview & secondly change the size of hte list depending on the car selected.

I have programmed so that when i select 'Honda' a new tableview opens. How do i populate data for the second table??

Any suggestions on how to proceed?
thanks

A: 

Populate the data for the second table exactly the same way as you populated the first.

It sounds as though you might not be using a UINavigationController. If not, you should be.

Read the whole of the iPhone Programming Guide.

hatfinch
A: 

The developer documentation Navigating a Data Hierarchy With Table Views will give you some hints how to do that.

Your second table needs (as the first one) an data source delegate. Before pushing the second table view controller set a "car-model" property to "Honda" so that your second table data source delegate can, for example, get the data from a NSDictionary with all your "car models" as keys and your list as array. Use that array as tableview data source.

Frank Martin
thxs will try that
Anonymous