Placing texts on Table instead of label

Discussion in 'iOS Programming' started by gryym, Jul 15, 2008.

  1. macrumors newbie

    Jul 14, 2008

    Instead of using labels to place the typed text in iPhone, i would like to use a TableView (UITableview). A snippet of a code to display texts on label is as follows:

    self.string = textField.text;
    . . .
    . . .

    NSString *greeting = [[NSString alloc] initWithFormat:mad:"%@!",
    label.text = greeting;
    [greeting release];

    Is there a similar method or code that i could follow for texts in TableView?

  2. macrumors regular

    Jan 18, 2006
    UITableViews require delegate methods to display data. There are many delegate methods, but the two that you must implement are the one that tells the table how many rows it has, and the other one is the one that tells the individual cells what to display. It sounds complicated, but it actually makes a lot of sense once you get accustomed to working with objective-c. There are some video tutorials over at that explain how to work with UITableViews.
  3. thread starter macrumors newbie

    Jul 14, 2008
    I see. Alright. Its gonna take me some time to understand it but i know i will get the gist of it soon. Thanks for the help.

  4. macrumors newbie

    Jul 22, 2008

Share This Page