tableView and detailedView

Discussion in 'iOS Programming' started by MACloop, Mar 1, 2010.

  1. MACloop macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #1
    Hello,
    I have been trying out to use tableViews as navigation in an App. If I have a tableView and the user selects a cell a detailed view will be displayed. Which is the best way to send the data saved for a specific object to the detailed view? If I have a car object and this object has a brand and a color variable. Shall I from the tableView where the user clicks on the cell, set the proper labels or text in the detailed view? Or should I rather send the object to the detailed view in a method like
    Code:
    [theViewControllerObject sendObject:object];
    and then use this object to fill the labels and the texts in the detaield view.

    Thanks in advance!
    MACloop
     
  2. Galarina macrumors member

    Galarina

    Joined:
    Jun 27, 2009
    #2
    I would advize to pass the car object to the detailedView. It's the cleanest solution.
     
  3. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #3
    Thanks for your answer! I think that you are right. It seem to be the best solution.
    Thanks!
    MACloop
     

Share This Page